/*
Theme Name: IA News Dev
Theme URI: https://ianewsdev.com
Author: IA News Dev
Description: Theme editorial original pour un blog WordPress dedie a l'actualite du developpement via IA.
Version: 1.3.5
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: ianewsdev-ai
*/

:root {
  --bg: #06080c;
  --bg-soft: #0b1017;
  --panel: #0f1620;
  --panel-strong: #151f2d;
  --text: #f4f7fb;
  --muted: #93a3b5;
  --line: rgba(173, 199, 226, 0.15);
  --accent: #58e6ff;
  --accent-2: #9587ff;
  --accent-3: #b9f45d;
  --danger: #ff6b6b;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 8px;
  --container: 1240px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(88, 230, 255, 0.055), transparent 360px),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
.site-shell { min-height: 100vh; }
.wrap { width: min(100% - 32px, var(--container)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 8, 12, 0.9);
  color: var(--text);
  backdrop-filter: blur(20px) saturate(130%);
}

.admin-bar .site-header { top: 32px; }

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  box-shadow: 0 0 28px rgba(88, 230, 255, 0.18);
}

.brand-mark img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-logo,
.brand-logo img {
  width: 42px;
  height: 42px;
}

.brand-logo img {
  object-fit: contain;
}

.brand-text { display: grid; gap: 0; }
.brand-name { font-size: 1.02rem; font-weight: 850; line-height: 1.05; letter-spacing: 0; }
.brand-tagline { max-width: 390px; overflow: hidden; color: var(--muted); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.utility-nav { margin-left: auto; }
.utility-nav ul { display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; list-style: none; }

.utility-nav a {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  transition: color 160ms ease;
}

.utility-nav a:hover { color: var(--text); }

.header-actions { position: relative; display: flex; align-items: center; gap: 8px; }

.header-search {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out);
}

.header-search:hover { border-color: rgba(88, 230, 255, 0.45); color: var(--accent); }
.header-search[aria-expanded="true"] { border-color: var(--accent); background: rgba(88, 230, 255, 0.1); color: var(--accent); }
.header-search:active { transform: scale(0.97); }

.header-search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 40;
  width: min(420px, calc(100vw - 24px));
  border: 1px solid rgba(88, 230, 255, 0.32);
  border-radius: 8px;
  background: rgba(10, 16, 24, 0.98);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.48);
  padding: 12px;
}

.header-search-panel[hidden] { display: none; }
.header-search-panel form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }

.header-search-panel input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: #070b11;
  color: var(--text);
  padding: 10px 12px;
}

.header-search-panel input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(88, 230, 255, 0.1); }

.header-search-panel button {
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #031015;
  padding: 0 13px;
  font-weight: 850;
  cursor: pointer;
}

.header-search-panel button:active { transform: scale(0.97); }

.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #031015;
  font-size: 0.84rem;
  font-weight: 850;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, transform 140ms var(--ease-out);
}

.header-action:hover { background: transparent; color: var(--accent); }
.header-action:active { transform: scale(0.97); }

.category-strip {
  border-top: 1px solid rgba(173, 199, 226, 0.09);
  background: rgba(10, 15, 22, 0.94);
}

.category-nav {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar { display: none; }
.category-nav ul { display: flex; align-items: center; width: max-content; margin: 0; padding: 0; list-style: none; }

.category-nav a {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  transition: color 160ms ease;
}

.category-nav a::after {
  position: absolute;
  right: 16px;
  bottom: 0;
  left: 16px;
  height: 2px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.5);
  transition: opacity 160ms ease, transform 180ms var(--ease-out);
}

.category-nav a:hover,
.category-nav .current-menu-item > a,
.category-nav .current-post-ancestor > a { color: var(--text); }
.category-nav a:hover::after,
.category-nav .current-menu-item > a::after,
.category-nav .current-post-ancestor > a::after { opacity: 1; transform: scaleX(1); }

.news-page {
  background:
    linear-gradient(90deg, rgba(88, 230, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(88, 230, 255, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  color: var(--text);
  padding: 18px 0 56px;
}

.news-container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  color: var(--text);
}

.news-sitebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  padding: 0 2px;
  border-bottom: 1px solid rgba(173, 199, 226, 0.1);
  color: var(--muted);
  font-size: 0.78rem;
}

.news-sitebar a {
  color: var(--accent);
  font-weight: 800;
}

.news-ticker {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.news-ticker strong {
  color: var(--accent);
  text-transform: uppercase;
}

.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
  padding: 24px 0 0;
}

.news-content {
  display: grid;
  min-width: 0;
  gap: 30px;
}

.lead-story {
  border-bottom: 1px solid rgba(88, 230, 255, 0.28);
  padding-bottom: 18px;
}

.lead-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 8.7;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

@media (hover: hover) and (pointer: fine) {
  .lead-media img { transition: transform 240ms var(--ease-out), filter 200ms ease; }
  .lead-media:hover img { filter: saturate(1.08); transform: scale(1.015); }
}

.lead-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lead-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), transparent 58%);
}

.lead-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(103, 232, 249, 0.50);
  border-radius: 999px;
  background: rgba(9, 16, 17, 0.78);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.lead-content h1 {
  margin: 12px 0 6px;
  color: var(--text);
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.02;
}

.lead-content p {
  margin: 0;
  color: var(--muted);
}

.top-story-grid,
.news-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.news-card-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-section {
  min-width: 0;
}

.news-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
  border-top: 1px solid rgba(88, 230, 255, 0.34);
  padding-top: 10px;
}

.news-section-title h2,
.news-widget h2 {
  margin: 0;
  color: var(--accent);
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.news-section-title span {
  color: var(--muted);
  font-size: 0.78rem;
  font-family: var(--mono);
  text-transform: uppercase;
}

.news-section-title a {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.story-list {
  display: grid;
  gap: 14px;
}

.news-sidebar {
  display: grid;
  gap: 16px;
  align-content: start;
  align-self: start;
  min-width: 0;
}

.news-widget {
  min-width: 0;
  border: 1px solid var(--line);
  border-top-color: rgba(88, 230, 255, 0.55);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(21, 31, 45, 0.96), rgba(10, 16, 24, 0.96));
  padding: 16px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
}

.news-widget h2 {
  margin-bottom: 12px;
}

.news-widget ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-widget li {
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

.news-widget a {
  color: var(--text);
  font-weight: 750;
}

.news-widget a:hover {
  color: var(--accent);
}

.news-sidebar-sticky {
  display: grid;
  gap: 16px;
  align-content: start;
  align-self: start;
}

@media (min-width: 981px) {
  .news-sidebar-sticky {
    position: sticky;
    top: 126px;
  }
}

.sidebar-editorial {
  position: relative;
  overflow: hidden;
  border-top-color: rgba(149, 135, 255, 0.7);
}

.sidebar-editorial::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 68px;
  height: 3px;
  background: var(--accent-3);
  content: "";
}

.sidebar-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-editorial p { margin: 0 0 14px; color: var(--muted); font-size: 0.88rem; }

.sidebar-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(149, 135, 255, 0.55);
  border-radius: 6px;
  color: var(--text) !important;
  font-size: 0.78rem;
  transition: background 160ms ease, border-color 160ms ease, transform 140ms var(--ease-out);
}

.sidebar-action:hover { border-color: var(--accent-2); background: rgba(149, 135, 255, 0.12); }
.sidebar-action:active { transform: scale(0.97); }

.bottom-news {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  background: rgba(239, 247, 244, 0.035);
  border-top: 1px solid var(--line);
}

.post-card.news-card,
.post-card.horizontal-card,
.post-card.mini-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.post-card.news-card:hover,
.post-card.horizontal-card:hover,
.post-card.mini-card:hover {
  transform: none;
  background: transparent;
}

.post-card.news-card .post-card-media {
  aspect-ratio: 16 / 10;
}

.post-card.news-card .post-card-body,
.post-card.horizontal-card .post-card-body,
.post-card.mini-card .post-card-body {
  padding: 8px 0 0;
  gap: 6px;
}

.post-card.news-card h3 {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.post-card.news-card p {
  color: var(--muted);
  font-size: 0.86rem;
}

.post-card.horizontal-card {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.post-card.horizontal-card .post-card-media {
  aspect-ratio: 16 / 10;
}

.post-card.horizontal-card h3 {
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.post-card.horizontal-card p {
  color: var(--muted);
}

.post-card.mini-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 9px;
  align-items: start;
  min-height: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.post-card.mini-card .post-card-media {
  aspect-ratio: 1.2 / 1;
  border-radius: 6px;
}

.post-card.mini-card h3 {
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.post-card.mini-card p,
.post-card.mini-card .read-more {
  display: none;
}

.post-card .post-meta {
  color: var(--muted);
  font-size: 0.68rem;
}

.post-card .read-more {
  color: var(--accent);
  font-size: 0.82rem;
}
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(239, 247, 244, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 247, 244, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: 44px;
  align-items: center;
  padding: 72px 0 48px;
}

.hero-kicker, .section-kicker, .post-eyebrow {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 880px;
  margin: 14px 0 18px;
  font-size: clamp(2.45rem, 6vw, 5.9rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero h1 span { color: var(--accent-2); }
.hero-copy { max-width: 660px; margin: 0; color: var(--muted); font-size: clamp(1.03rem, 2vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(239, 247, 244, 0.06);
  color: var(--text);
  font-weight: 800;
}

.btn-primary { border-color: rgba(103, 232, 249, 0.48); background: var(--accent); color: #071210; }
.btn:hover { transform: translateY(-1px); }

.signal-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 33, 35, 0.92), rgba(16, 26, 28, 0.86));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.signal-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(103, 232, 249, 0.12), transparent 42%, rgba(167, 139, 250, 0.10));
  pointer-events: none;
}

.signal-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.signal-dots { display: flex; gap: 7px; }
.signal-dots span { width: 9px; height: 9px; border-radius: 99px; background: var(--accent); }
.signal-dots span:nth-child(2) { background: var(--accent-2); }
.signal-dots span:nth-child(3) { background: var(--danger); }
.signal-title { color: var(--muted); font-family: var(--mono); font-size: 0.8rem; }
.signal-body { position: relative; padding: 20px; }

.signal-metric {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid rgba(239, 247, 244, 0.08);
}

.signal-metric:last-child { border-bottom: 0; }
.metric-label { color: var(--muted); font-family: var(--mono); font-size: 0.75rem; }
.metric-bar { height: 8px; overflow: hidden; border-radius: 99px; background: rgba(239, 247, 244, 0.10); }
.metric-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-3)); }
.metric-value { color: var(--text); font-family: var(--mono); font-size: 0.8rem; font-weight: 800; }

.ticker { border-block: 1px solid var(--line); background: rgba(239, 247, 244, 0.04); }
.ticker-inner { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 0; }

.ticker a, .tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.ticker a:hover, .tag-pill:hover { border-color: rgba(103, 232, 249, 0.42); color: var(--accent); }
.content-band { padding: 52px 0; }

.archive-hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 0.10), transparent 42%),
    linear-gradient(90deg, rgba(103, 232, 249, 0.08), rgba(167, 139, 250, 0.07));
}

.archive-hero-inner {
  padding: 46px 0 34px;
}

.archive-hero h1 {
  max-width: 850px;
  margin: 8px 0 12px;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.archive-description {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
}

.archive-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-head h1, .section-head h2 {
  margin: 6px 0 0;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-link { color: var(--accent); font-weight: 800; white-space: nowrap; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.post-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 22, 32, 0.9);
  overflow: hidden;
  transition: transform 180ms var(--ease-out), border-color 180ms ease, background 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .post-card:hover { transform: translateY(-2px); border-color: rgba(88, 230, 255, 0.42); background: rgba(21, 31, 45, 0.98); }
}

.post-card:active { transform: scale(0.99); }

.post-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 0.20), transparent 45%),
    linear-gradient(45deg, rgba(167, 139, 250, 0.16), rgba(52, 211, 153, 0.10)),
    var(--panel);
}

.post-card-media img { width: 100%; height: 100%; object-fit: cover; }

.post-card-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  max-width: calc(100% - 20px);
  min-height: 24px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.50);
  border-radius: 999px;
  background: rgba(9, 16, 17, 0.84);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  color: var(--accent);
  padding: 0 8px;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.post-card.mini-card .post-card-label,
.post-card.compact-card .post-card-label {
  left: 4px;
  bottom: 4px;
  max-width: calc(100% - 8px);
  min-height: 17px;
  padding: 0 4px;
  font-size: 0.5rem;
}

.article > .post-card-media .post-card-label {
  left: 12px;
  bottom: 12px;
  min-height: 26px;
  padding: 0 9px;
  font-size: 0.74rem;
}
.post-card-body { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 18px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-family: var(--mono); font-size: 0.75rem; }
.post-card h3 { margin: 0; font-size: 1.26rem; line-height: 1.18; letter-spacing: 0; }
.post-card p { margin: 0; color: var(--muted); }
.read-more { margin-top: auto; color: var(--accent); font-weight: 850; }
.feature-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr); gap: 22px; align-items: start; }
.featured-card { min-height: 420px; }
.featured-card h3 { font-size: clamp(1.8rem, 3vw, 3.2rem); }
.side-stack { display: grid; gap: 14px; }
.compact-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 12px; }
.compact-card .post-card-media { aspect-ratio: 1; border-radius: 6px; }
.compact-card .post-card-body { padding: 0; }
.compact-card h3 { font-size: 1rem; }

.newsletter-band {
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(103, 232, 249, 0.10), rgba(167, 139, 250, 0.08), rgba(52, 211, 153, 0.08));
}

.newsletter-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 440px); gap: 28px; align-items: center; padding: 42px 0; }
.newsletter-inner h2 { margin: 0 0 8px; font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.08; }
.newsletter-inner p { margin: 0; color: var(--muted); }
.newsletter-form { display: flex; gap: 10px; }

.newsletter-form input {
  min-width: 0;
  flex: 1;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 16, 17, 0.72);
  color: var(--text);
  padding: 0 13px;
}

.newsletter-form button { cursor: pointer; }
.main-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; padding: 44px 0 60px; }
.article { max-width: 790px; }
.article-header { margin-bottom: 28px; }

.article h1 {
  margin: 12px 0 16px;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 18px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.82rem;
}

.article-meta-item {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

.article-meta-item:first-child { padding-left: 0; border-left: 0; }
.article-meta-label { color: #c5d0dc; font-weight: 800; }
.article-reading-time { color: var(--accent-3); font-weight: 750; }

.article-meta-author {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  margin-left: 4px;
  border: 1px solid rgba(149, 135, 255, 0.32);
  border-radius: 6px;
  background: rgba(149, 135, 255, 0.08);
  color: var(--text);
  padding: 0 9px;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, transform 140ms var(--ease-out);
}

.article-meta-author:hover { border-color: var(--accent-2); background: rgba(149, 135, 255, 0.14); }
.article-meta-author:active { transform: scale(0.98); }

.article-author-mark {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-2);
  color: #080712;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 900;
}

.article-content { color: #dce8e4; font-size: 1.06rem; }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-content h2, .article-content h3 { color: var(--text); line-height: 1.1; letter-spacing: 0; }
.article-content h2 { scroll-margin-top: 150px; }
.article-content pre, .article-content code { font-family: var(--mono); }
.article-content pre { overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #050909; }
.article-content blockquote { margin: 28px 0; padding: 6px 0 6px 18px; border-left: 3px solid var(--accent); color: var(--muted); }

.breadcrumbs {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.76rem;
}

.breadcrumbs ol { display: flex; min-width: 0; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li { display: flex; min-width: 0; align-items: center; gap: 7px; }
.breadcrumbs li:not(:last-child)::after { color: rgba(147, 163, 181, 0.55); content: "/"; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current="page"] { overflow: hidden; max-width: 46ch; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }

.article-toc {
  margin: 28px 0 32px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: rgba(15, 22, 32, 0.82);
  padding: 18px 20px;
}

.article-toc-label { display: block; margin-bottom: 10px; color: var(--accent); font-size: 0.82rem; font-weight: 900; text-transform: uppercase; }
.article-toc ol { display: grid; gap: 6px; margin: 0; padding-left: 20px; }
.article-toc a { color: var(--muted); font-size: 0.9rem; }
.article-toc a:hover { color: var(--text); }

.related-posts { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.related-posts .section-head { margin-bottom: 18px; }
.related-posts .section-head h2 { margin: 2px 0 0; }
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 33, 35, 0.64);
  padding: 24px;
}

.author-profile {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 18px;
  align-items: center;
  max-width: 780px;
}

.author-profile img {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.comments-area {
  margin-top: 38px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.comments-area h2, .comments-area h3 { margin-top: 0; line-height: 1.1; letter-spacing: 0; }
.comment-list { display: grid; gap: 16px; margin: 0 0 28px; padding: 0; list-style: none; }
.comment-body { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(20, 33, 35, 0.52); padding: 16px; }
.comment-meta { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; }
.comment-content { color: #dce8e4; }
.comment-reply-link { color: var(--accent); font-weight: 800; }
.comment-form { display: grid; gap: 12px; }
.comment-form input, .comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 16, 17, 0.72);
  color: var(--text);
  padding: 12px;
}

.comment-form .submit {
  width: auto;
  min-height: 46px;
  padding: 0 17px;
  border-color: rgba(103, 232, 249, 0.48);
  background: var(--accent);
  color: #071210;
  font-weight: 800;
  cursor: pointer;
}

.sidebar { display: grid; gap: 18px; align-content: start; }

.widget {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 33, 35, 0.64);
  padding: 18px;
}

.widget h2, .widget h3 { margin: 0 0 14px; font-size: 1rem; }
.widget ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.widget a { color: var(--muted); }
.widget a:hover { color: var(--accent); }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }

.page-numbers, .nav-links a, .nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.page-numbers.current, .page-numbers:hover, .nav-links a:hover { border-color: rgba(103, 232, 249, 0.42); color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); background: #05070a; }
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 30px 0 10px;
}

.footer-widget {
  color: var(--muted);
}

.footer-widget h2 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.95rem;
  text-transform: uppercase;
}

.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 28px 0; color: var(--muted); font-size: 0.92rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; }

.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 28;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(88, 230, 255, 0.5);
  border-radius: 6px;
  background: rgba(10, 16, 24, 0.92);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  color: var(--accent);
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms var(--ease-out), background 160ms ease, color 160ms ease;
}

.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top:hover { background: var(--accent); color: #031015; }
.scroll-top:active { transform: scale(0.97); }
.scroll-top:focus-visible { outline: 3px solid rgba(88, 230, 255, 0.24); outline-offset: 3px; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 920px) {
  .header-main { min-height: 58px; gap: 10px; }
  .brand {
    flex: 1;
    gap: 9px;
    min-width: 0;
  }
  .brand-logo,
  .brand-logo img {
    width: 36px;
    height: 36px;
    max-width: 36px;
    max-height: 36px;
  }
  .brand-logo {
    display: grid;
    flex: 0 0 36px;
    place-items: center;
    overflow: hidden;
  }
  .brand-logo img {
    object-fit: contain;
  }
  .brand-text { min-width: 0; }
  .brand-name {
    overflow: hidden;
    font-size: 0.98rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .brand-tagline,
  .utility-nav { display: none; }
  .header-search { width: 34px; height: 34px; }
  .header-action { min-height: 34px; padding: 0 11px; font-size: 0.76rem; }
  .category-nav a { min-height: 38px; padding: 0 12px; }
  .category-nav a::after { right: 12px; left: 12px; }
  .hero-inner, .feature-layout, .newsletter-inner, .main-layout { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-layout,
  .bottom-news,
  .footer-widgets {
    grid-template-columns: 1fr;
  }
  .news-sidebar {
    grid-template-columns: 1fr;
  }
  .news-sidebar-sticky {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .news-card-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 24px, var(--container)); }
  .hero-inner { padding: 48px 0 34px; }
  .post-grid, .sidebar { grid-template-columns: 1fr; }
  .section-head, .footer-inner, .newsletter-form { align-items: stretch; flex-direction: column; }
  .compact-card { grid-template-columns: 78px 1fr; }
  .signal-metric { grid-template-columns: 72px 1fr; }
  .metric-value { grid-column: 2; }
  .news-container {
    width: calc(100% - 24px);
  }
  .news-layout {
    padding: 18px 0 0;
  }
  .news-content {
    gap: 18px;
  }
  .news-ticker {
    align-items: flex-start;
    flex-direction: column;
    padding: 8px 2px;
  }
  .top-story-grid,
  .news-card-grid,
  .news-card-grid-compact,
  .news-sidebar,
  .news-sidebar-sticky {
    grid-template-columns: 1fr;
  }
  .post-card.horizontal-card {
    grid-template-columns: 1fr;
  }
  .post-card.mini-card {
    grid-template-columns: 82px 1fr;
  }
  .related-posts .post-grid { grid-template-columns: 1fr; }
  .article-toc { padding: 15px 16px; }
  .article-meta { align-items: flex-start; flex-direction: column; gap: 7px; }
  .article-meta-item { min-height: 24px; padding: 0; border-left: 0; }
  .article-meta-author { margin-left: 0; }
  .scroll-top {
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
  }
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lead-media img,
  .post-card,
  .header-action,
  .header-search,
  .sidebar-action,
  .scroll-top,
  .category-nav a::after { transition-duration: 0.01ms; }
}
