/* ============================================================
   AsPredictions News — main.css  v1.0.0
   Layout: left sidebar + single-column main content
   Tokens: exact AsPredictions.com design system
   ============================================================ */

/* ── LIGHT MODE TOKENS ── */
:root {
  --bg:            #f4f4f5;
  --panel:         #ffffff;
  --panel-soft:    #f9fafb;
  --text:          #111827;
  --muted:         #6b7280;
  --accent:        #020617;
  --accent-hover:  #000000;
  --accent-soft:   rgba(15,23,42,.06);
  --accent-light:  #e5e7eb;
  --success:       #16a34a;
  --success-soft:  #ecfdf5;
  --warning:       #eab308;
  --warning-soft:  #fef9c3;
  --danger:        #ef4444;
  --border:        #e5e7eb;
  --soft-border:   #f3f4f6;
  --shadow-sm:     0 1px 3px rgba(15,23,42,.07);
  --shadow:        0 3px 12px rgba(15,23,42,.10);
  --shadow-lg:     0 20px 64px rgba(15,23,42,.22);
  --radius:        12px;
  --radius-lg:     16px;
  --radius-full:   999px;
  --header-h:      62px;
  --sidebar-w:     240px;
  --t-fast:        140ms ease-out;
  --t:             200ms cubic-bezier(.16,1,.3,1);
  --t-slow:        260ms cubic-bezier(.16,1,.3,1);
}

/* ── DARK MODE TOKENS ── */
html[data-theme="dark"] {
  --bg:            #020617;
  --panel:         #0b1120;
  --panel-soft:    #0d1526;
  --text:          #f1f5f9;
  --muted:         #94a3b8;
  --accent:        #f1f5f9;
  --accent-hover:  #ffffff;
  --accent-soft:   rgba(148,163,184,.14);
  --accent-light:  #111827;
  --success:       #22c55e;
  --success-soft:  rgba(34,197,94,.15);
  --warning:       #eab308;
  --warning-soft:  rgba(234,179,8,.15);
  --danger:        #f87171;
  --border:        #1e293b;
  --soft-border:   #0f172a;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.6);
  --shadow:        0 4px 20px rgba(0,0,0,.55);
  --shadow-lg:     0 20px 60px rgba(0,0,0,.85);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--t-fast), opacity var(--t-fast); }
a:hover { color: var(--accent-hover); }
h1,h2,h3,h4,h5,h6 { line-height: 1.2; letter-spacing: -.02em; color: var(--text); }
p:last-child { margin-bottom: 0; }
.muted  { color: var(--muted); }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }

/* ── CONTAINER ── */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── PAGE WRAPPER ── */
.page-wrap {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-areas: "sidebar main";
  gap: 28px;
  align-items: flex-start;
  padding-top: 28px;
  padding-bottom: 48px;
}

.page-wrap__sidebar { grid-area: sidebar; position: sticky; top: calc(var(--header-h) + 20px); }
.page-wrap__main    { grid-area: main; }

/* ── HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 85%, transparent 15%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: background .2s ease, border-color .2s ease;
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* Brand */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.brand-icon {
  width: 32px; height: 32px;
  border-radius: 9px; flex-shrink: 0;
  background: radial-gradient(circle at 22% 8%, #fff 0%, #e2e8f0 38%, #111827 100%);
  box-shadow: 0 6px 18px rgba(15,23,42,.32);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #000;
}
html[data-theme="dark"] .brand-icon {
  background: radial-gradient(circle at 22% 8%, #334155 0%, #1e293b 100%);
}
.brand-name { font-size: 15px; font-weight: 800; letter-spacing: .08em; color: var(--text); line-height: 1; }
.brand-tag  { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 1px; }

/* Search bar in header */
.header-search {
  flex: 1;
  max-width: 340px;
  position: relative;
}
.header-search input {
  width: 100%;
  height: 36px;
  padding: 0 14px 0 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.header-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15,23,42,.08);
  background: var(--panel);
}
.header-search svg {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  stroke: var(--muted);
  fill: none; stroke-width: 2; stroke-linecap: round;
  pointer-events: none;
}

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Theme toggle */
.theme-toggle {
  width: 34px; height: 34px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--panel);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--accent);
  transition: background var(--t-fast), transform 80ms ease-out;
}
.theme-toggle:hover  { background: var(--accent-soft); }
.theme-toggle:active { transform: scale(.93); }
.theme-toggle svg {
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round;
  width: 15px; height: 15px;
}
html[data-theme="light"] .theme-toggle { background: #f8fafc; border-color: #e2e8f0; color: #0f172a; }
html[data-theme="dark"]  .theme-toggle { background: #1e293b; border-color: #334155; color: #fbbf24; }

/* Mobile menu button */
.mobile-btn {
  display: none;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer; color: var(--muted);
}
.mobile-btn svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; width: 17px; height: 17px; }

/* ── MOBILE OVERLAY + DRAWER ── */
.mob-overlay {
  position: fixed; inset: 0;
  background: rgba(2,6,23,.6);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-slow), visibility 0s linear 260ms;
  z-index: 200;
}
.mob-overlay.open { opacity: 1; visibility: visible; transition-delay: 0s; }

.mob-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(280px, 85vw);
  background: var(--panel);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateX(-100%);
  transition: transform var(--t-slow);
  z-index: 201;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.mob-drawer.open { transform: translateX(0); }

.mob-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mob-drawer__head span { font-weight: 800; font-size: 15px; }
.mob-drawer__close {
  width: 28px; height: 28px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--panel-soft);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 16px;
}

.mob-drawer__body { padding: 12px 14px; flex: 1; }
.mob-drawer__body .menu {
  list-style: none;
  display: flex; flex-direction: column; gap: 2px;
}
.mob-drawer__body .menu-item > a {
  display: flex; align-items: center;
  padding: 10px 12px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; color: var(--muted);
  transition: background var(--t-fast), color var(--t-fast);
}
.mob-drawer__body .menu-item > a:hover,
.mob-drawer__body .current-menu-item > a { background: var(--accent-soft); color: var(--accent); }
.mob-drawer__body .sub-menu { list-style: none; padding: 4px 0 4px 14px; }
.mob-drawer__body .sub-menu a { display: block; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.mob-drawer__body .sub-menu a:hover { color: var(--accent); background: var(--accent-soft); }

/* ── LEFT SIDEBAR ── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Sidebar section label */
.sidebar-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  padding: 14px 10px 6px;
}
.sidebar-label:first-child { padding-top: 4px; }

/* Nav list — categories, pages, links */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-nav a,
.sidebar-nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background var(--t-fast), color var(--t-fast), transform 80ms ease-out;
  text-decoration: none;
}
.sidebar-nav a:hover,
.sidebar-nav button:hover { background: var(--accent-soft); color: var(--accent); }
.sidebar-nav a.is-active,
.sidebar-nav button.is-active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
}
html[data-theme="dark"] .sidebar-nav a.is-active,
html[data-theme="dark"] .sidebar-nav button.is-active { background: var(--accent-soft); }

.sidebar-nav a .count,
.sidebar-nav button .count {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: var(--panel-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  flex-shrink: 0;
}

/* Sidebar divider */
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* Recent posts in sidebar */
.sidebar-recent { display: flex; flex-direction: column; gap: 0; }
.sidebar-post {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--soft-border);
}
.sidebar-post:last-child { border-bottom: none; }
.sidebar-post__thumb {
  width: 56px; height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft-border);
  flex-shrink: 0;
}
.sidebar-post__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-post__title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-post__title a { color: inherit; }
.sidebar-post__title a:hover { color: var(--accent); }
.sidebar-post__date { font-size: 10px; color: var(--muted); margin-top: 3px; }

/* Tag cloud in sidebar */
.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
}
.sidebar-tags a {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--panel-soft);
  font-size: 11px;
  color: var(--muted);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.sidebar-tags a:hover { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 20%, var(--border) 80%); }

/* Widget area overrides */
.widget { margin-bottom: 4px; }
.widget-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin-bottom: 8px;
  padding: 14px 10px 0;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { border-bottom: 1px solid var(--soft-border); }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; font-size: 13px; font-weight: 500; color: var(--muted);
  border-radius: 10px;
  transition: background var(--t-fast), color var(--t-fast);
}
.widget ul li a:hover { background: var(--accent-soft); color: var(--accent); }

/* ── FEATURED HERO POST ── */
.hero-post {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
}
.hero-post__img-wrap {
  aspect-ratio: 21/9;
  overflow: hidden;
  position: relative;
  background: var(--soft-border);
}
.hero-post__img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms ease-out;
  display: block;
}
.hero-post:hover .hero-post__img-wrap img { transform: scale(1.025); }

.hero-post__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(2,6,23,.65) 75%,
    rgba(2,6,23,.88) 100%
  );
}
.hero-post__label {
  position: absolute;
  top: 14px; left: 14px;
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239,68,68,.4);
}
.hero-post__meta-top {
  position: absolute;
  bottom: 14px; left: 14px; right: 14px;
  color: #fff;
  z-index: 1;
}
.hero-post__cat {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  background: var(--accent); color: var(--panel);
  margin-bottom: 8px;
}
html[data-theme="dark"] .hero-post__cat { background: #f1f5f9; color: #020617; }

.hero-post__title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.025em;
  color: #fff;
  margin-bottom: 10px;
}
.hero-post__title a { color: inherit; }
.hero-post__title a:hover { opacity: .85; }
.hero-post__excerpt {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,.78);
  margin-bottom: 12px;
  max-width: 680px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-post__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.65);
}
.hero-post__meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ── SECTION HEADER ── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.section-head__title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-head__title::before {
  content: "";
  width: 3px; height: 14px;
  border-radius: 2px;
  background: var(--accent);
  display: inline-block;
}
.section-head__link { font-size: 12px; color: var(--muted); font-weight: 500; }
.section-head__link:hover { color: var(--accent); }

/* ── POST FEED (single column clean list) ── */
.post-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Each post row */
.feed-item {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.feed-item:first-child { padding-top: 0; }
.feed-item:last-child  { border-bottom: none; }

.feed-item:hover { background: color-mix(in srgb, var(--panel-soft) 60%, transparent 40%); }
.feed-item:hover { border-radius: var(--radius); padding-inline: 10px; margin-inline: -10px; }

.feed-item__thumb {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--soft-border);
  flex-shrink: 0;
}
.feed-item__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 380ms ease-out;
}
.feed-item:hover .feed-item__thumb img { transform: scale(1.04); }

.feed-item__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

/* Category badge */
.feed-item__cat {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--border) 85%);
  align-self: flex-start;
  transition: background var(--t-fast), color var(--t-fast);
}
.feed-item__cat:hover { background: var(--accent); color: var(--panel); }

.feed-item__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: -.015em;
}
.feed-item__title a { color: inherit; }
.feed-item__title a:hover { color: var(--accent); }

.feed-item__excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-item__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.feed-item__meta time { display: inline-flex; align-items: center; gap: 4px; }
.feed-item__read {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}
.feed-item__author { font-weight: 500; }

/* No posts fallback */
.no-posts {
  padding: 32px 24px;
  text-align: center;
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

/* ── PAGINATION ── */
.aspnews-pagination { margin-top: 28px; }
.aspnews-pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 6px;
  justify-content: flex-start;
}
.aspnews-pagination .page-numbers li a,
.aspnews-pagination .page-numbers li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.aspnews-pagination .page-numbers li a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 20%, var(--border) 80%);
}
.aspnews-pagination .page-numbers li span.current {
  background: var(--accent);
  color: var(--panel);
  border-color: var(--accent);
  font-weight: 700;
}

/* ── SINGLE POST ── */
.single-article {
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.single-article__header { padding: 28px 32px 0; }
.single-article__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.single-article__title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.03em;
  margin-bottom: 18px;
}
.single-article__hero {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
}
.single-article__body {
  padding: 32px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
}
.single-article__body > * + * { margin-top: 1.2em; }
.single-article__body h2 { font-size: 22px; margin-top: 2em; }
.single-article__body h3 { font-size: 18px; margin-top: 1.6em; }
.single-article__body p  { margin-bottom: 0; }
.single-article__body img { border-radius: var(--radius); margin: 1.2em 0; }
.single-article__body blockquote {
  padding: 16px 22px;
  border-left: 4px solid var(--accent);
  background: var(--panel-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; color: var(--muted);
}
.single-article__body ul,
.single-article__body ol { padding-left: 1.5em; }
.single-article__body code {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: .88em;
}
.single-article__body pre {
  background: #0b1120; color: #e2e8f0;
  border-radius: var(--radius); padding: 20px;
  overflow-x: auto;
}
.single-article__body pre code { background: none; border: none; padding: 0; color: inherit; }

/* Post meta badges */
.cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  background: var(--accent); color: var(--panel);
}
html[data-theme="dark"] .cat-badge { background: var(--accent-soft); color: var(--accent); }
.meta-time { font-size: 12px; color: var(--muted); }
.meta-read { font-size: 12px; color: var(--muted); }
.meta-author { font-size: 12px; color: var(--muted); font-weight: 500; }

/* Post tags */
.post-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 20px 32px;
  border-top: 1px solid var(--border);
}
.post-tag {
  padding: 4px 12px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--panel-soft);
  font-size: 12px; color: var(--muted);
  transition: background var(--t-fast), color var(--t-fast);
}
.post-tag:hover { background: var(--accent-soft); color: var(--accent); }

/* Post nav */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  padding: 20px 32px;
  border-top: 1px solid var(--border);
}
.post-nav__item {
  display: flex; flex-direction: column; gap: 5px;
  padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--panel-soft);
  transition: border-color var(--t-fast), transform 80ms ease-out;
  text-decoration: none;
}
.post-nav__item:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--border) 70%); transform: translateY(-2px); }
.post-nav__dir   { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.post-nav__title { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.3; }
.post-nav__item--next { text-align: right; }

/* Related posts */
.related-posts { padding: 24px 32px; border-top: 1px solid var(--border); }
.related-grid  { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 14px; }
.related-card  {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--panel-soft);
  transition: transform var(--t), border-color var(--t);
}
.related-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 20%, var(--border) 80%); }
.related-card__img { aspect-ratio: 16/9; overflow: hidden; }
.related-card__img img { width:100%;height:100%;object-fit:cover;transition:transform 300ms ease-out; }
.related-card:hover .related-card__img img { transform: scale(1.05); }
.related-card__body { padding: 12px; }
.related-card__cat  { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 5px; }
.related-card__title { font-size: 12px; font-weight: 700; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.related-card__title a { color: inherit; }
.related-card__title a:hover { color: var(--accent); }

/* ── SEARCH FORM ── */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--panel-soft);
  color: var(--text);
  padding: 8px 14px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.search-form input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15,23,42,.08);
}
.search-form button {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--panel);
  border: none; cursor: pointer;
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  transition: opacity var(--t-fast);
}
.search-form button:hover { opacity: .85; }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 92%, rgba(15,23,42,.05) 8%);
  padding: 28px 0 22px;
  margin-top: 8px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 22px;
}
.footer-brand h3 { font-size: 15px; margin-bottom: 7px; }
.footer-brand p  { font-size: 12px; color: var(--muted); }
.footer-col h4 {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); margin-bottom: 10px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 5px; }
.footer-col ul li a { font-size: 12px; color: var(--muted); display: block; transition: color var(--t-fast); }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--soft-border);
  gap: 10px; flex-wrap: wrap;
}
.footer-copy  { font-size: 12px; color: var(--muted); }
.footer-links { display: flex; gap: 14px; }
.footer-links a { font-size: 12px; color: var(--muted); transition: color var(--t-fast); }
.footer-links a:hover { color: var(--accent); }
.footer-disclaimer {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--panel-soft);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 11px; color: var(--muted); line-height: 1.6;
}

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 9999;
  width: 42px; height: 42px; border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 90%, transparent 10%);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: none; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 900; color: var(--accent);
  transition: transform .15s ease, box-shadow .15s ease;
}
html[data-theme="dark"] .back-to-top { background: rgba(15,23,42,.9); }
.back-to-top:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.back-to-top.visible { display: flex; }

/* ── 404 ── */
.error-404       { text-align: center; padding: 80px 20px; }
.error-404-code  { font-size: 96px; font-weight: 800; line-height: 1; color: var(--border); margin-bottom: 14px; }
.error-404-title { font-size: 24px; margin-bottom: 10px; }
.error-404-text  { color: var(--muted); margin-bottom: 24px; max-width: 420px; margin-inline: auto; font-size: 14px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; font-family: inherit; text-decoration: none;
  transition: background var(--t), box-shadow var(--t), transform 80ms ease-out;
}
.btn-primary { background: var(--accent); color: var(--panel); box-shadow: 0 8px 24px rgba(15,23,42,.4); }
.btn-primary:hover { opacity: .88; color: var(--panel); }
.btn-ghost   { background: var(--panel-soft); color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); }

/* ── ARCHIVE / CATEGORY HEADER ── */
.archive-header {
  padding: 20px 24px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.archive-header h1 { font-size: 22px; margin-bottom: 6px; }
.archive-header p  { font-size: 13px; color: var(--muted); margin: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  :root { --sidebar-w: 210px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .page-wrap {
    grid-template-columns: 1fr;
    grid-template-areas: "main" "sidebar";
    gap: 24px;
  }
  .page-wrap__sidebar { position: static; }
  .primary-nav { display: none; }
  .mobile-btn  { display: inline-flex; }
  .header-search { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .feed-item {
    grid-template-columns: 120px minmax(0,1fr);
    gap: 12px;
    padding: 16px 0;
  }
  .feed-item__title { font-size: 14px; }
  .feed-item__excerpt { display: none; }
  .hero-post__title { font-size: 18px; }
  .hero-post__excerpt { display: none; }
  .single-article__title { font-size: 22px; }
  .single-article__header { padding: 20px 18px 0; }
  .single-article__body { padding: 20px 18px; font-size: 14px; }
  .post-tags, .post-nav, .related-posts { padding-inline: 18px; }
  .post-nav { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .hero-post__img-wrap { aspect-ratio: 16/9; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .brand-tag { display: none; }
}

@media (max-width: 420px) {
  .feed-item { grid-template-columns: 1fr; }
  .feed-item__thumb { aspect-ratio: 16/7; }
}
