/* ============================================================
   Knight Crew — Main Stylesheet
   Ported from design/styles.css and extended for WordPress
   ============================================================ */

:root {
  --bg-0: #071321;
  --bg-1: #071321;
  --bg-2: #0c1d30;
  --bg-3: #112540;
  --bg-4: #163255;
  --line:   rgba(120, 160, 195, 0.10);
  --line-2: rgba(120, 160, 195, 0.22);
  --line-3: rgba(120, 160, 195, 0.35);
  --text:      #d8e6ef;
  --text-dim:  #7e9bb1;
  --text-mute: #4f6a80;
  --accent:        #2eb6d6;
  --accent-bright: #5dd1ec;
  --accent-soft:   rgba(46, 182, 214, 0.12);
  --warn: #ef8b3f;
  --good: #5fd57b;
  --bad:  #e85a5a;
  --font-ui: 'Noto Sans', 'Helvetica Neue', sans-serif;
  --r-sm:   4px;
  --r-md:   6px;
  --r-lg:   10px;
  --r-pill: 999px;
  --container: 1200px;
  --gutter:    24px;
}

/* ============================================================
   WordPress Admin Bar Compensation
   ============================================================ */
.admin-bar .navbar { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .navbar { top: 46px; }
}

/* ============================================================
   Base Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ============================================================
   Scrollbar
   ============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
* { scrollbar-color: var(--bg-4) var(--bg-0); scrollbar-width: thin; }

body {
  font-family: var(--font-ui);
  background: var(--bg-0);
  color: var(--text);
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
::selection { background: var(--accent); color: var(--bg-0); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); }
button { font-family: inherit; }
img { max-width: 100%; height: auto; display: block; }

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

/* ============================================================
   Topbar
   ============================================================ */
.topbar {
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  height: 36px;
}
.topbar-inner { display: flex; align-items: center; justify-content: flex-start; gap: 0; height: 100%; }
.topbar .crumbs::before {
  content: "›";
  color: var(--text-mute);
  font-size: 12px;
  margin-right: 14px;
}
.topbar .org { color: var(--text-dim); font-weight: 400; }
.topbar .org sup { font-size: 8px; vertical-align: super; margin-left: 1px; }
.topbar .crumbs { display: flex; align-items: center; gap: 14px; }
.topbar .crumbs a { color: var(--accent); text-transform: uppercase; }
.topbar .crumbs .sep { color: var(--text-mute); font-size: 12px; }
.topbar .crumbs .here { color: var(--text-dim); }

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
  background: var(--bg-3);
  border-bottom: 1px solid var(--line-2);
  position: relative;
  z-index: 100;
  height: 60px;
}
.navbar-inner {
  display: flex;
  align-items: stretch;
  height: 100%;
}
.hamburger { align-self: center; flex-shrink: 0; margin-right: 6px; }
.brand     { align-self: center; flex-shrink: 0; margin-right: 8px; }
.navbar-auth { align-self: center; flex-shrink: 0; }

/* Primary nav menu */
.navbar-menu {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin: 0 0 0 16px;
  padding: 0 0 0 12px;
  flex: 1;
  height: 100%;
  position: relative;
}
.navbar-menu::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 1.5px;
  background: var(--line-2);
  transform: skewX(-15deg);
}
.navbar-menu li {
  display: flex;
  align-items: stretch;
  height: 100%;
}
.navbar-menu a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 18px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: background 200ms ease, color 200ms ease;
}
.navbar-menu a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}
.hamburger {
  width: 36px; height: 36px; background: transparent; border: 0; cursor: pointer;
  display: grid; grid-template-rows: repeat(3, 2px); gap: 6px; align-content: center;
  padding: 0 6px; flex-shrink: 0;
}
.hamburger span { display: block; height: 2px; background: var(--text); border-radius: 1px; }
.hamburger:hover span { background: var(--accent-bright); }
.brand {
  display: flex; align-items: center;
  text-decoration: none;
}
.brand-mark {
  font-weight: 700; font-style: italic;
  font-size: 30px; letter-spacing: 0.04em;
  color: #fff; line-height: 1;
  position: relative; display: inline-block;
}
.brand-slash { display: none; }
.brand-section { display: none; }

/* ============================================================
   Mobile Nav Drawer
   ============================================================ */
.nav-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 280px; max-width: 80vw;
  background: var(--bg-3);
  border-right: 1px solid var(--line-2);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 280ms ease;
  display: flex; flex-direction: column;
}
.nav-drawer.is-open { transform: translateX(0); }
.nav-drawer-inner { padding: 24px 20px; flex: 1; overflow-y: auto; }
.nav-drawer-close {
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-dim); display: block; margin-bottom: 24px; padding: 0;
}
.nav-drawer-close:hover { color: var(--accent-bright); }
.nav-drawer-menu { list-style: none; margin: 0; padding: 0; }
.nav-drawer-menu li { border-bottom: 1px solid var(--line); }
.nav-drawer-menu a {
  display: block; padding: 14px 0;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim); text-decoration: none;
}
.nav-drawer-menu a:hover { color: var(--accent-bright); }
.nav-overlay {
  position: fixed; top: 120px; left: 0; right: 0; bottom: 0;
  background: rgba(2, 6, 12, 0.25);
  z-index: 199; opacity: 0; pointer-events: none;
  transition: opacity 280ms ease;
}
.nav-overlay.is-visible { opacity: 1; pointer-events: all; }

/* ============================================================
   Codex Search Hero
   ============================================================ */
.hero {
  position: relative; height: 540px; overflow: hidden;
  background: var(--bg-0);
}
.hero-art { position: absolute; inset: 0; z-index: 0; opacity: 0.55; pointer-events: none; }
.hero-art svg { width: 100%; height: 100%; display: block; }
.hero-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 500px at 50% 55%, transparent 0%, var(--bg-0) 90%);
}
.hero-fade-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; height: 200px;
  background: linear-gradient(180deg, transparent, var(--bg-0));
}
.hero-content {
  position: relative; z-index: 2; height: 100%;
  display: grid; place-items: center;
}
.search-box {
  width: 100%; max-width: 680px;
  background: rgba(8, 24, 44, 0.55);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-3);
  border-radius: var(--r-sm);
  padding: 20px 26px;
  display: flex; align-items: center; gap: 14px;
  transition: border-color 200ms ease, background 200ms ease;
  cursor: text;
}
.search-box:focus-within {
  border-color: var(--accent);
  background: rgba(10, 40, 70, 0.65);
}
.search-box svg { color: var(--text-dim); flex-shrink: 0; }
.search-box input {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--text); font-family: inherit; font-size: 18px; font-weight: 300;
}
.search-box input::placeholder { color: var(--text-dim); }

/* ============================================================
   Tabs
   ============================================================ */
.tabs {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tabs-inner { display: grid; grid-template-columns: repeat(3, 1fr); }
.tab {
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: var(--text-dim); font-family: inherit;
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 22px 12px; cursor: pointer; position: relative;
  transition: color 160ms ease, border-color 160ms ease;
}
.tab + .tab::before {
  content: ""; position: absolute; left: 0; top: 25%; bottom: 25%;
  width: 1px; background: var(--line-2);
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--accent-bright); border-bottom-color: var(--accent); }

/* ============================================================
   Section Wrappers
   ============================================================ */
.section { padding: 36px 0; }
.section-band { background: var(--bg-1); }
.section-band-dark { background: var(--bg-0); }
.section-head {
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  margin: 0 0 18px; color: var(--text); font-weight: 700;
}
.section-head .dim { color: var(--text-dim); font-weight: 300; }
.section-bar {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--line); padding-bottom: 14px;
}
.section-bar .section-head { margin-bottom: 0; }
.section-bar .all {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-dim); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.section-bar .all:hover { color: var(--accent-bright); }

/* ============================================================
   Category Grid
   ============================================================ */
.cats-row { display: grid; grid-template-columns: 1fr 320px; gap: 36px; }
@media (max-width: 980px) { .cats-row { grid-template-columns: 1fr; } }
.cat-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-list-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 880px) {
  .cat-list { grid-template-columns: repeat(2, 1fr); }
}
.cat-card {
  position: relative; display: block; aspect-ratio: 1 / 1;
  border-radius: var(--r-sm); overflow: hidden;
  background: var(--bg-3); border: 1px solid var(--line);
  transition: transform 220ms ease, border-color 220ms ease;
  text-decoration: none; color: inherit; isolation: isolate;
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cat-card .cat-art { position: absolute; inset: 0; }
.cat-card .cat-fade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 12, 0.9) 100%);
}
.cat-card .cat-meta { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; }
.cat-card .cat-name { font-size: 16px; color: #fff; margin: 0 0 2px; font-weight: 400; }
.cat-card .cat-count { font-size: 11px; color: var(--text-dim); letter-spacing: 0.05em; }
.view-all {
  display: block; text-align: right; margin-top: 18px;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text);
}
.view-all::before {
  content: ""; display: block; width: 140px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin: 0 0 8px auto;
}

/* ============================================================
   Procedural Placeholder Visuals
   ============================================================ */
.viz { position: absolute; inset: 0; background: var(--bg-2); overflow: hidden; }
.viz::before, .viz::after { content: ""; position: absolute; inset: 0; }

.viz-portrait::before {
  background:
    radial-gradient(110% 80% at 50% 110%, rgba(20,60,95,0) 0%, var(--bg-0) 70%),
    radial-gradient(60% 50% at 50% 35%, rgba(70,160,200,0.35), transparent 70%),
    linear-gradient(180deg, #1b3a5a, #061321);
}
.viz-portrait::after {
  background:
    radial-gradient(28% 36% at 50% 55%, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.6) 50%, transparent 75%),
    radial-gradient(12% 20% at 50% 38%, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.6) 50%, transparent 75%);
  mix-blend-mode: multiply;
}
.viz-ship::before {
  background:
    radial-gradient(80% 60% at 50% 55%, rgba(46,182,214,0.25), transparent 70%),
    linear-gradient(135deg, #0d2740 0%, #061321 100%);
}
.viz-ship::after {
  background: linear-gradient(20deg,
    transparent 35%, rgba(140,170,200,0.18) 38%, rgba(180,200,220,0.28) 42%,
    rgba(140,170,200,0.18) 46%, transparent 50%);
  filter: blur(0.4px);
}
.viz-city::before {
  background:
    radial-gradient(60% 40% at 50% 90%, rgba(46,182,214,0.3), transparent 70%),
    linear-gradient(180deg, #0a2238 0%, #02060c 90%);
}
.viz-city::after {
  background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(46,182,214,0.12) 14px 15px, transparent 15px 28px);
  mask-image: linear-gradient(0deg, black 0%, black 35%, transparent 60%);
  -webkit-mask-image: linear-gradient(0deg, black 0%, black 35%, transparent 60%);
}
.viz-alien::before {
  background:
    radial-gradient(50% 60% at 50% 55%, rgba(180,200,160,0.18), transparent 70%),
    linear-gradient(180deg, #1d2a26, #061321);
}
.viz-alien::after {
  background: radial-gradient(28% 32% at 50% 50%, rgba(70,90,80,0.85) 0%, rgba(70,90,80,0.4) 60%, transparent 80%);
}
.viz-animal::before {
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(200,130,90,0.18), transparent 70%),
    linear-gradient(180deg, #2a1b14, #061321);
}
.viz-archive::before {
  background:
    radial-gradient(70% 60% at 50% 60%, rgba(46,182,214,0.4), transparent 70%),
    linear-gradient(135deg, #0c2540, #02060c);
}
.viz-archive::after {
  background: linear-gradient(90deg, transparent 35%, rgba(180,220,240,0.4) 50%, transparent 65%);
  filter: blur(2px);
}
.viz-moon::before {
  background:
    radial-gradient(35% 35% at 60% 50%, #b8c0c8 0%, #5a6470 50%, transparent 75%),
    radial-gradient(80% 80% at 50% 50%, rgba(46,100,140,0.5), transparent 70%),
    linear-gradient(180deg, #021018 0%, #000 100%);
}
.viz-orison::before { background: linear-gradient(180deg, #b66a3a 0%, #6a3a2a 40%, #1a1422 100%); }
.viz-orison::after {
  background: repeating-linear-gradient(180deg, transparent 0 12px, rgba(0,0,0,0.4) 12px 13px, transparent 13px 26px);
  mask-image: linear-gradient(180deg, transparent 0%, transparent 55%, black 60%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 55%, black 60%);
}
.viz-logo { background: #fff; }
.viz-logo .logo-text {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 700; font-size: 22px; color: #0d2540; letter-spacing: 0.04em; font-style: italic;
}
.viz-monogram {
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(46,182,214,0.15), transparent 70%),
    var(--bg-2);
}
.viz-monogram svg {
  position: absolute; inset: 0; margin: auto;
  width: 50%; height: 50%; color: rgba(46,182,214,0.55);
}
.viz-battle::before {
  background:
    radial-gradient(40% 30% at 50% 70%, rgba(232,90,60,0.45), transparent 70%),
    linear-gradient(180deg, #2a1418 0%, #02060c 80%);
}
.viz-battle::after {
  background: radial-gradient(80% 30% at 50% 95%, rgba(255,180,80,0.6), transparent 70%);
  mix-blend-mode: screen;
}

/* ============================================================
   Featured + Trending
   ============================================================ */
.feat-row { display: grid; grid-template-columns: 1fr 320px; gap: 36px; }
@media (max-width: 980px) { .feat-row { grid-template-columns: 1fr; } }
.feat-article { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
@media (max-width: 720px) { .feat-article { grid-template-columns: 1fr; } }
.feat-img {
  aspect-ratio: 16 / 10; border-radius: var(--r-sm);
  background: var(--bg-3); position: relative; overflow: hidden; border: 1px solid var(--line);
}
.feat-title { font-size: 26px; font-weight: 400; margin: 0 0 12px; color: #fff; line-height: 1.15; }
.feat-title a { color: inherit; }
.feat-title a:hover { color: var(--accent-bright); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  background: var(--bg-3); border: 1px solid var(--line-2);
  color: var(--text); font-size: 12px; padding: 4px 10px;
  border-radius: var(--r-sm); letter-spacing: 0.02em; text-decoration: none;
}
.chip:hover { border-color: var(--accent); color: var(--accent-bright); }
.feat-summary { font-size: 14px; color: var(--text-dim); margin: 0 0 16px; line-height: 1.6; }
.tags { display: flex; gap: 16px 22px; flex-wrap: wrap; font-size: 13px; }
.tag { color: var(--accent); font-weight: 400; }
.tag::before { content: "# "; color: var(--text-mute); }
.tag:hover { color: var(--accent-bright); }

.trending { display: flex; flex-direction: column; }
.trend-row {
  display: grid; grid-template-columns: 28px 18px 1fr; gap: 10px;
  align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.trend-row:last-child { border-bottom: 0; }
.trend-row .num { font-size: 22px; color: var(--text-dim); font-weight: 300; line-height: 1; }
.trend-row .arr { font-size: 14px; line-height: 1.4; }
.trend-row .arr.up { color: var(--good); }
.trend-row .arr.dn { color: var(--warn); }
.trend-row a { color: var(--text); font-size: 14px; line-height: 1.35; }
.trend-row a:hover { color: var(--accent-bright); }

/* ============================================================
   News Quartet
   ============================================================ */
.news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1100px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .news-grid { grid-template-columns: 1fr; } }
.news-col-head {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text); margin-bottom: 10px; font-weight: 700;
}
.news-col-head .dim { color: var(--text-dim); font-weight: 300; }
.news-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color 200ms ease, transform 200ms ease;
  text-decoration: none; color: inherit;
}
.news-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.news-card .news-img {
  aspect-ratio: 16 / 10; position: relative; overflow: hidden;
}
.news-card .news-body { padding: 16px 16px 18px; flex: 1; }
.news-card .news-title { font-size: 18px; color: #fff; margin: 0 0 10px; font-weight: 400; }
.news-card .news-summary { font-size: 13px; color: var(--text-dim); line-height: 1.55; margin: 12px 0 14px; }
.news-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.news-tag-pill {
  display: inline-block;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  color: var(--accent);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  letter-spacing: 0.04em;
}
.news-tag-pill::before { content: "#"; color: var(--text-mute); margin-right: 2px; }

/* ============================================================
   Slim Footer
   ============================================================ */
.foot {
  border-top: 1px solid var(--line); background: var(--bg-1);
  padding: 24px 0; text-align: center;
  font-size: 11px; letter-spacing: 0.06em; color: var(--text-mute);
}

/* ============================================================
   Article Page
   ============================================================ */
.subnav { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.subnav-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.subnav a { display: block; text-decoration: none; }
.subnav button {
  width: 100%; background: transparent; border: 0;
  color: var(--text-dim); font-family: inherit;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 22px 12px; cursor: pointer; position: relative;
}
.subnav button:hover { color: var(--text); }
.subnav a + a button::before {
  content: ""; position: absolute; left: 0; top: 25%; bottom: 25%;
  width: 1px; background: var(--line-2);
}
.subnav .icon { color: var(--accent); margin-right: 6px; }

.article-page {
  display: grid;
  grid-template-columns: 200px 1fr 220px;
  gap: 40px;
  padding-top: 32px; padding-bottom: 80px;
}
@media (max-width: 1100px) {
  .article-page { grid-template-columns: 1fr; }
  .article-toc { display: none; }
}
.article-back {
  font-size: 13px; letter-spacing: 0.05em; color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; padding-top: 6px;
}
.article-back:hover { color: var(--accent-bright); }
.article-h1 {
  font-size: 32px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; margin: 0 0 14px; color: #fff;
}
.article-meta-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.article-hashtags { display: flex; gap: 8px 22px; flex-wrap: wrap; margin-bottom: 26px; font-size: 13px; }
.article-body p {
  font-size: 14px; line-height: 1.7; color: var(--text); margin: 0 0 18px;
}
.article-body p a {
  color: var(--text); border-bottom: 1px solid var(--text-mute); padding-bottom: 1px;
}
.article-body p a:hover { color: var(--accent-bright); border-bottom-color: var(--accent); }
/* ── Article body: lists ── */
.article-body ul,
.article-body ol {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.article-body ul li,
.article-body ol li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 8px;
}
/* Teal dot bullet */
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
/* Numbered list */
.article-body ol { counter-reset: kc-ol; }
.article-body ol li::before {
  counter-increment: kc-ol;
  content: counter(kc-ol) ".";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.7;
}
/* Nested lists */
.article-body ul ul,
.article-body ol ol,
.article-body ul ol,
.article-body ol ul {
  margin-top: 6px;
  margin-bottom: 0;
}
.article-body ul ul li::before { background: var(--text-mute); }

/* ── Article body: tables ── */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 13px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  overflow: hidden;
}
/* Override Gutenberg block library's 3px border on thead */
.article-body table thead,
.article-body .wp-block-table thead { border-bottom: none; }
.article-body table tfoot,
.article-body .wp-block-table tfoot  { border-top: none; }

.article-body table th {
  background: var(--bg-3);
  color: var(--text);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: left;
  padding: 11px 16px;
  border-bottom: none;
  border-right: 1px solid var(--line);
  font-weight: 400;
}
.article-body table th:last-child { border-right: 0; }
.article-body table td {
  color: var(--text-dim);
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.6;
}
.article-body table td:last-child { border-right: 0; }
.article-body table tr:last-child td { border-bottom: 0; }
.article-body table tr:hover td {
  background: rgba(46, 182, 214, 0.04);
  color: var(--text);
}

.article-h2, .article-body h2 {
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  margin: 36px 0 16px; color: var(--text); font-weight: 400;
}

/* Infobox */
.infobox {
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  overflow: hidden; background: var(--bg-2); margin-bottom: 24px;
}
.infobox-img {
  aspect-ratio: 4 / 3; background: var(--bg-3); position: relative; overflow: hidden;
}
.infobox-img img { width: 100%; height: 100%; object-fit: cover; }
.infobox-title { padding: 14px 16px 6px; font-size: 18px; color: #fff; border-bottom: 1px solid var(--line); }
.infobox-table { width: 100%; border-collapse: collapse; }
.infobox-table th, .infobox-table td {
  padding: 10px 16px; font-size: 13px;
  text-align: left; vertical-align: top; border-bottom: 1px solid var(--line);
}
.infobox-table th { width: 40%; color: var(--text-dim); font-weight: 300; }
.infobox-table td { color: var(--text); }
.infobox-table tr:last-child th, .infobox-table tr:last-child td { border-bottom: 0; }

/* Table of Contents */
.article-toc {
  position: sticky; top: 28px; align-self: start;
  padding-left: 18px; border-left: 1px solid var(--line);
}
.article-toc h4 {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-mute); margin: 0 0 14px; font-weight: 400;
}
.article-toc a {
  display: block; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-mute); padding: 8px 0 8px 12px;
  border-left: 2px solid transparent; margin-left: -14px; text-decoration: none;
}
.article-toc a.is-active { color: var(--accent-bright); border-left-color: var(--accent); }
.article-toc a:hover { color: var(--text); }

/* Related Articles */
.related-band {
  background: var(--bg-1); padding: 36px 0 56px; border-top: 1px solid var(--line);
}
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 920px; }
@media (max-width: 720px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  display: grid; grid-template-columns: 1fr 120px; gap: 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 14px 14px 14px 16px;
  text-decoration: none; color: inherit;
  transition: border-color 200ms ease;
}
.related-card:hover { border-color: var(--accent); }
.related-card .rc-title { font-size: 17px; color: #fff; margin: 0 0 8px; }
.related-card .chips { margin-bottom: 8px; }
.related-card .rc-summary { font-size: 12.5px; color: var(--text-dim); line-height: 1.55; margin: 0 0 10px; }
.related-card .rc-img {
  width: 120px; height: 100%; min-height: 100px;
  border-radius: var(--r-sm); background: var(--bg-3); position: relative; overflow: hidden;
}

/* ============================================================
   Homepage Hero
   ============================================================ */
.home-hero {
  position: relative; min-height: 720px; overflow: hidden;
  background: var(--bg-0);
}
.home-hero-art {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center right; background-repeat: no-repeat;
}
.home-hero-art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg,
      rgba(7,19,33,0.92) 0%, rgba(7,19,33,0.78) 30%,
      rgba(7,19,33,0.45) 55%, rgba(7,19,33,0.18) 80%, rgba(7,19,33,0.45) 100%),
    linear-gradient(180deg,
      rgba(7,19,33,0.50) 0%, transparent 25%, transparent 65%, rgba(7,19,33,0.90) 100%);
}
/* Blur panel behind stats — fades from full blur at bottom to nothing */
.home-hero::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 320px; z-index: 1; pointer-events: none;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  mask-image: linear-gradient(to top, black 20%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, black 20%, transparent 100%);
}
.home-hero-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 240px;
  background: linear-gradient(180deg, transparent, #071321); z-index: 2;
}
.home-hero-content {
  position: relative; z-index: 3;
  padding-top: 96px; padding-bottom: 36px;
}
.hero-status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--good); padding: 6px 12px;
  border: 1px solid rgba(95,213,123,0.35);
  background: rgba(95,213,123,0.08);
  border-radius: var(--r-pill); margin-bottom: 32px;
}
.hero-status .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 0 rgba(95,213,123,0.7);
  animation: pulse-status 1.1s ease-in-out infinite;
}
@keyframes pulse-status {
  0%   { box-shadow: 0 0 0 0   rgba(95,213,123,0.85); transform: scale(1); }
  50%  { box-shadow: 0 0 0 10px rgba(95,213,123,0);    transform: scale(1.15); }
  100% { box-shadow: 0 0 0 0   rgba(95,213,123,0);     transform: scale(1); }
}
.hero-wordmark {
  font-family: 'Barlow', 'Noto Sans', sans-serif;
  font-size: clamp(36px, 5vw, 68px); font-weight: 900; font-style: normal;
  letter-spacing: 0.02em; line-height: 1; margin: 0; color: #fff;
  text-transform: uppercase;
}
.hero-wordmark .row { display: block; }
.hero-wordmark .accent-bar {
  display: inline-block; width: 6px; height: 0.8em;
  background: var(--accent); margin-left: 0.18em;
  transform: skewX(-12deg); vertical-align: middle;
}
.hero-tagline {
  margin: 20px 0 0; font-size: 14px; font-weight: 300;
  color: var(--text-dim); max-width: 560px; line-height: 1.65;
}
.hero-tagline em { font-style: italic; color: var(--accent-bright); }
.hero-meta {
  display: flex; gap: 22px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-mute);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .v { color: var(--text); font-weight: 400; }
.hero-meta .sep-dot { color: var(--text-mute); }
.hero-cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 40px; }
.hero-stats {
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero-stats .stats-grid { grid-template-columns: repeat(5, 1fr); }
.hero-stats .stat { padding: 20px 24px; }
@media (max-width: 980px) { .hero-stats .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .hero-stats .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: inherit; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 16px 24px; border-radius: var(--r-sm);
  border: 1px solid var(--line-3);
  background: rgba(8,24,44,0.45); color: var(--text);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  text-decoration: none; cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease, transform 200ms ease;
}
.btn:hover {
  color: var(--accent-bright); border-color: var(--accent); transform: translateY(-1px);
}
.btn.is-primary { background: var(--accent); color: var(--bg-0); border-color: var(--accent); }
.btn.is-primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); color: var(--bg-0); }
.btn .arr { display: inline-block; transition: transform 200ms ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ============================================================
   Stats Band
   ============================================================ */
.stats-band {
  background: var(--bg-1);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
@media (max-width: 980px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 32px 24px; position: relative; text-align: left; }
.stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 28%; bottom: 28%;
  width: 1px; background: var(--line-2);
}
@media (max-width: 980px) { .stat:nth-child(3n+1)::before { display: none; } }
@media (max-width: 640px) { .stat:nth-child(2n+1)::before { display: none; } }
.stat .label {
  font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--text-dim); font-weight: 600; margin-bottom: 12px;
}
.stat .value {
  font-size: 36px; font-weight: 300; color: #fff; line-height: 1;
  font-feature-settings: "tnum"; letter-spacing: -0.01em;
}
.stat .value .unit { font-size: 14px; color: var(--text-dim); margin-left: 6px; letter-spacing: 0; }
.stat .delta { margin-top: 10px; font-size: 11px; letter-spacing: 0.05em; color: var(--text-dim); }
.stat .delta .up { color: var(--good); margin-right: 4px; }
.stat .delta .dn { color: var(--warn); margin-right: 4px; }

/* ============================================================
   Codex Highlight (Homepage)
   ============================================================ */
.codex-highlight { padding: 80px 0; }
.codex-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; margin-top: 24px; }
@media (max-width: 980px) { .codex-row { grid-template-columns: 1fr; } }
.codex-feat {
  display: block; text-decoration: none; color: inherit;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
  transition: border-color 220ms ease, transform 220ms ease;
}
.codex-feat:hover { border-color: var(--accent); transform: translateY(-2px); }
.codex-feat .feat-img {
  width: 100%; aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--line); border-radius: 0; border-left: 0; border-right: 0; border-top: 0;
}
.codex-feat .feat-body { padding: 28px 28px 32px; }
.codex-feat .eyebrow {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-bright); margin-bottom: 12px;
}
.codex-feat .feat-title { font-size: 30px; font-weight: 400; color: #fff; margin: 0 0 14px; line-height: 1.15; }
.codex-feat .feat-summary { font-size: 14px; color: var(--text-dim); line-height: 1.6; margin: 0 0 18px; }
.codex-feat .feat-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-bright); text-decoration: none;
}
.codex-feat:hover .feat-cta .arr { transform: translateX(3px); }
.codex-latest { display: flex; flex-direction: column; gap: 14px; }
.latest-card {
  display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 14px;
  text-decoration: none; color: inherit;
  transition: border-color 200ms ease, transform 200ms ease;
}
.latest-card:hover { border-color: var(--accent); transform: translateX(2px); }
.latest-card .l-img {
  width: 96px; height: 96px; border-radius: var(--r-sm);
  background: var(--bg-3); position: relative; overflow: hidden;
}
.latest-card .l-meta {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-mute); margin-bottom: 6px;
}
.latest-card .l-meta .cat { color: var(--accent-bright); }
.latest-card .l-title { font-size: 16px; font-weight: 400; color: #fff; margin: 0; line-height: 1.3; }
.latest-card:hover .l-title { color: var(--accent-bright); }

/* ============================================================
   CTA Band
   ============================================================ */
.cta-band {
  position: relative; padding: 80px 0; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 500px at 50% 50%, rgba(46,182,214,0.18), transparent 70%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
}
.cta-band::before {
  content: ""; position: absolute; top: -40%; right: -10%; width: 600px; height: 220%;
  background: linear-gradient(180deg, transparent, rgba(46,182,214,0.06), transparent);
  transform: skewX(-18deg); pointer-events: none;
}
.cta-inner {
  position: relative; display: grid;
  grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center;
}
@media (max-width: 880px) { .cta-inner { grid-template-columns: 1fr; } }
.cta-title {
  font-size: clamp(36px, 5vw, 56px); font-weight: 400; color: #fff;
  line-height: 1.05; margin: 0 0 18px; letter-spacing: 0.02em;
}
.cta-title em { font-style: italic; color: var(--accent-bright); font-weight: 700; }
.cta-sub { font-size: 15px; color: var(--text-dim); margin: 0 0 28px; max-width: 540px; line-height: 1.6; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.cta-panel {
  background: var(--bg-0); border: 1px solid var(--line-2);
  border-radius: var(--r-md); padding: 28px;
}
.cta-panel .label {
  font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--text-mute); margin-bottom: 16px;
}
.cta-panel ul { list-style: none; margin: 0; padding: 0; }
.cta-panel li {
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
}
.cta-panel li:last-child { border-bottom: 0; }
.cta-panel li .k { color: var(--text-dim); letter-spacing: 0.05em; }
.cta-panel li .v { color: #fff; font-weight: 400; }

/* ============================================================
   Big Footer
   ============================================================ */
.foot-big { background: var(--bg-1); border-top: 1px solid var(--line); padding: 56px 0 24px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
@media (max-width: 880px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-col h5 {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text); margin: 0 0 16px; font-weight: 400;
}
.foot-col a, .foot-col li a {
  display: block; font-size: 13px; color: var(--text-dim);
  text-decoration: none; padding: 5px 0;
}
.foot-col a:hover, .foot-col li a:hover { color: var(--accent-bright); }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-brand .brand-mark {
  font-size: 36px; font-weight: 700; font-style: italic;
  color: #fff; display: inline-block; margin-bottom: 14px;
}
.foot-brand .brand-mark::after { display: none; }
.foot-brand p { font-size: 13px; color: var(--text-dim); margin: 0 0 18px; max-width: 280px; line-height: 1.55; }
.foot-social { display: flex; gap: 10px; }
.foot-social a {
  width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--text-dim); padding: 0;
  transition: border-color 200ms ease, color 200ms ease;
}
.foot-social a:hover { color: var(--accent-bright); border-color: var(--accent); }
.foot-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; letter-spacing: 0.06em; color: var(--text-mute);
  flex-wrap: wrap; gap: 10px;
}
.foot-bottom .legal { display: flex; gap: 22px; }
.foot-bottom .legal a { color: var(--text-mute); text-decoration: none; }
.foot-bottom .legal a:hover { color: var(--accent-bright); }

/* ============================================================
   WordPress Block Alignment Support
   ============================================================ */
.alignleft  { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; text-align: center; }
.alignfull  { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); }
.alignwide  { width: calc(100% + 48px); max-width: none; margin-left: -24px; }

/* Focus visible — accessibility */
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
