/*
Theme Name: BlockView
Theme URI: https://blockview.ir
Author: BlockView Studio
Description: قالب تحریریه‌ی مدرن برای اخبار اقتصادی و کریپتو — تایپوگرافی فارسی، حالت تاریک، لایه‌بندی مجله‌ای.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: blockview
Tags: news, blog, rtl-language-support, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
@font-face {
  font-family: "Vazirmatn";
  src: url("assets/fonts/Vazirmatn-VariableFont_wght.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

:root {
  --paper: #faf9f6;
  --paper-2: #f2f0ea;
  --surface: #ffffff;
  --surface-2: #f4f2ec;
  --ink: #0c1113;
  --ink-2: #333b40;
  --muted: #5f686d;
  --line: #e5e2da;
  --line-2: #d5d1c7;
  --accent: #0b6b58;
  --accent-2: #0a5949;
  --accent-soft: #e6f2ee;
  --gold: #8a5a10;
  --gold-soft: #f6efdf;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(12, 17, 19, 0.04), 0 10px 30px -18px rgba(12, 17, 19, 0.25);
  --shadow-2: 0 2px 6px rgba(12, 17, 19, 0.06), 0 26px 60px -28px rgba(12, 17, 19, 0.42);
  --max: 1264px;
  --gutter: clamp(18px, 4vw, 40px);
  --head-h: 76px;
  --ease: cubic-bezier(0.22, 0.68, 0.18, 1);
  --font: "Vazirmatn", "Segoe UI", Tahoma, system-ui, sans-serif;
}

[data-theme="dark"] {
  --paper: #080b0c;
  --paper-2: #0d1213;
  --surface: #101617;
  --surface-2: #151d1e;
  --ink: #f0f4f2;
  --ink-2: #c2ccca;
  --muted: #8d9895;
  --line: #1f292a;
  --line-2: #2c3839;
  --accent: #46c4a6;
  --accent-2: #78d8c4;
  --accent-soft: #0f2621;
  --gold: #e2b879;
  --gold-soft: #241d10;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.6);
  --shadow-2: 0 24px 60px -24px rgba(0, 0, 0, 0.85);
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 24px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-top: var(--head-h);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

body.nav-open,
body.search-open { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 800; line-height: 1.35; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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;
}

.skip {
  position: fixed;
  top: -100px;
  right: 16px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  transition: top 0.2s;
}
.skip:focus { top: 16px; }

.num { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

/* ==========================================================================
   3. Buttons, chips, icon buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); }
[data-theme="dark"] .btn-accent { color: #07110f; }
.btn-ghost { border-color: var(--line-2); background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-dark { background: var(--ink); color: var(--paper); }

.icon-btn {
  width: 42px; height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  color: var(--ink-2);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background-color 0.2s, color 0.2s;
}
.chip:hover { background: var(--accent); color: #fff; }
.chip-accent { background: var(--accent); color: #fff; }
[data-theme="dark"] .chip-accent { color: #06100e; }
.chip-gold { background: var(--gold-soft); color: var(--gold); }
.chip-glass {
  background: rgba(8, 12, 13, 0.55);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ==========================================================================
   4. Header
   ========================================================================== */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  font-size: 12.5px;
  color: var(--muted);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
}
.topbar-date { display: inline-flex; align-items: center; gap: 8px; }
.topbar-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.topbar-links { display: flex; align-items: center; gap: 18px; }
.topbar-links a { color: var(--muted); transition: color 0.2s; }
.topbar-links a:hover { color: var(--accent); }

.site-head {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s, border-color 0.3s;
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--head-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.04em;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .brand-mark { background: var(--accent); color: #06100e; }
.brand-mark::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
  filter: blur(6px);
}
[data-theme="dark"] .brand-mark::after { background: #06100e; opacity: 0.25; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 20px; font-weight: 900; letter-spacing: -0.02em; }
.brand-text em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nav { margin-inline-start: auto; }
.nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav a {
  display: inline-block;
  padding: 10px 13px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
  position: relative;
  transition: color 0.2s, background-color 0.2s;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav .current-menu-item > a,
.nav .current_page_item > a { color: var(--accent); }
.nav .current-menu-item > a::after {
  content: "";
  position: absolute;
  inset-inline: 13px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.head-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.head-actions .btn { margin-inline-start: 8px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-2);
  cursor: pointer;
  place-items: center;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  box-shadow: 0 5px 0 var(--ink), 0 -5px 0 var(--ink);
  transition: transform 0.25s, box-shadow 0.25s;
}
body.nav-open .nav-toggle span {
  box-shadow: none;
  transform: rotate(45deg);
}
body.nav-open .nav-toggle span::after {
  content: "";
  position: absolute;
  width: 18px; height: 1.5px;
  background: var(--ink);
  transform: rotate(90deg);
}

/* ticker */
.ticker {
  border-top: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
  height: 38px;
  display: flex;
  align-items: center;
}
.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-inline: var(--gutter);
  height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  padding-inline-end: 24px;
}
[data-theme="dark"] .ticker-label { background: var(--accent); color: #06100e; }
.ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  white-space: nowrap;
  animation: ticker 46s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-inline: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  position: relative;
}
.ticker-track a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  width: 4px; height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--line-2);
}
.ticker-track a:hover { color: var(--accent); }
/* The track holds the items twice, so a -50% shift loops seamlessly. */
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* mobile nav panel */
.nav-panel { display: contents; }

/* ==========================================================================
   5. Search overlay
   ========================================================================== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: grid;
  place-items: start center;
  padding: 18vh var(--gutter) 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s var(--ease), visibility 0.28s;
}
.search-overlay.is-open { opacity: 1; visibility: visible; }
.search-box { width: min(720px, 100%); }
.search-box label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.search-box .search-field {
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--line-2);
  background: transparent;
  padding: 10px 0;
  font-family: inherit;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800;
  color: var(--ink);
  outline: none;
}
.search-box .search-field:focus { border-color: var(--accent); }
.search-box .search-field::placeholder { color: var(--line-2); }
.search-hint { margin-top: 18px; font-size: 13px; color: var(--muted); }
.search-close {
  position: absolute;
  top: 24px;
  inset-inline-end: var(--gutter);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* ==========================================================================
   6. Section heads
   ========================================================================== */
.section { margin-top: clamp(48px, 6vw, 76px); }
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.sec-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: clamp(21px, 2.4vw, 28px);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.sec-title::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
  transform: translateY(-6px);
}
.sec-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: color 0.2s, gap 0.2s;
}
.sec-more:hover { color: var(--accent); gap: 10px; }
.sec-more svg { width: 16px; height: 16px; }

/* ==========================================================================
   7. Front page — lead
   ========================================================================== */
.front-top {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
  padding-top: clamp(22px, 3vw, 34px);
}

.lead-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  min-height: clamp(340px, 52vh, 520px);
  isolation: isolate;
}
.lead-card__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.lead-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.lead-card:hover .lead-card__media img { transform: scale(1.05); }
.lead-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(6, 10, 11, 0.92) 0%, rgba(6, 10, 11, 0.55) 38%, rgba(6, 10, 11, 0.08) 72%),
    linear-gradient(to bottom, rgba(6, 10, 11, 0.35), transparent 30%);
}
.lead-card__body {
  position: relative;
  height: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding: clamp(22px, 3.4vw, 40px);
  color: #fff;
}
.lead-card__body .chip-glass { align-self: flex-start; }
.lead-card__title {
  font-size: clamp(24px, 3.1vw, 40px);
  line-height: 1.32;
  font-weight: 900;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: #fff;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.lead-card__excerpt {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14.5px;
  line-height: 1.85;
  max-width: 54ch;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lead-card__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.65);
  flex-wrap: wrap;
}
.lead-card__meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }

.lead-side { display: grid; gap: clamp(16px, 2vw, 22px); }

.side-list {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.side-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 10px;
  border-radius: 14px;
  transition: background-color 0.2s;
}
.side-item:hover { background: var(--surface-2); }
.side-item__thumb {
  width: 84px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}
.side-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-item__title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.side-item__meta { margin-top: 6px; font-size: 11.5px; color: var(--muted); }

/* trend box */
.trend {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 18px 8px;
}
.trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.trend-head span:last-child { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.trend-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  align-items: start;
}
.trend-item:last-child { border-bottom: 0; }
.trend-num {
  font-size: 15px;
  font-weight: 900;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.7;
}
.trend-item__title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.7;
  transition: color 0.2s;
}
.trend-item:hover .trend-item__title { color: var(--accent); }

/* ==========================================================================
   8. Cards
   ========================================================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 30px);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: var(--line-2);
}
.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.card:hover .card__media img { transform: scale(1.045); }
.card__media .chip { position: absolute; top: 12px; inset-inline-start: 12px; }
.card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.card:hover .card__title { color: var(--accent); }
.card__excerpt {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.card__cat { color: var(--accent); font-weight: 700; }
.card__cat:hover { text-decoration: underline; }
.card__meta {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.card__meta .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

/* horizontal card */
.card-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.card-row:first-child { padding-top: 0; }
.card-row__media {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
}
.card-row__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.card-row:hover .card-row__media img { transform: scale(1.05); }
.card-row__title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.55;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.card-row:hover .card-row__title { color: var(--accent); }
.card-row__meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; align-items: center; }

/* media placeholder when no featured image */
.card__media.is-empty,
.card-row__media.is-empty,
.lead-card__media.is-empty {
  background:
    radial-gradient(120% 90% at 15% 10%, color-mix(in srgb, var(--accent) 30%, transparent) 0%, transparent 55%),
    radial-gradient(100% 80% at 90% 90%, color-mix(in srgb, var(--gold) 24%, transparent) 0%, transparent 60%),
    var(--surface-2);
}
.card__media.is-empty::after,
.card-row__media.is-empty::after {
  content: "BV";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: color-mix(in srgb, var(--ink) 16%, transparent);
}

/* ==========================================================================
   9. Split band (editorial list + aside)
   ========================================================================== */
.band {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.ranked { display: grid; }
.ranked-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.ranked-item:first-child { padding-top: 0; }
.ranked-item__num {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--line-2);
  font-variant-numeric: tabular-nums;
  transition: color 0.25s;
}
.ranked-item:hover .ranked-item__num { color: var(--accent); }
.ranked-item__title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.6;
  margin-bottom: 6px;
  letter-spacing: -0.015em;
  transition: color 0.2s;
}
.ranked-item:hover .ranked-item__title { color: var(--accent); }
.ranked-item__meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; align-items: center; }

.aside-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
  margin-bottom: 22px;
}
.aside-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cat-list { list-style: none; display: grid; gap: 2px; }
.cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s, padding 0.2s;
}
.cat-list a:hover { background: var(--surface-2); color: var(--accent); padding-inline-start: 16px; }
.cat-list .count {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   10. Newsletter
   ========================================================================== */
.newsletter {
  position: relative;
  overflow: hidden;
  border-radius: clamp(20px, 3vw, 28px);
  background: var(--ink);
  color: var(--paper);
  padding: clamp(28px, 4.4vw, 52px);
  margin-top: clamp(48px, 6vw, 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  isolation: isolate;
}
.newsletter::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto -8% -60% auto;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.28;
  filter: blur(80px);
}
.newsletter::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -60% auto auto -10%;
  width: 380px; height: 380px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.newsletter .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  margin-bottom: 14px;
}
[data-theme="dark"] .newsletter .kicker { color: var(--accent); }
.newsletter h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.4;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.newsletter p { margin: 12px 0 0; color: rgba(255, 255, 255, 0.66); font-size: 14px; line-height: 1.85; }
.newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-form input {
  flex: 1 1 220px;
  min-width: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  padding: 14px 20px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.newsletter-form input::placeholder { color: rgba(255, 255, 255, 0.45); }
.newsletter-form input:focus { border-color: var(--accent-2); background: rgba(255, 255, 255, 0.12); }
.newsletter-form button { background: var(--paper); color: var(--ink); }
.newsletter-note { margin-top: 12px; font-size: 11.5px; color: rgba(255, 255, 255, 0.42); }
[data-theme="dark"] .newsletter-form button { background: var(--accent); color: #06100e; }

/* ==========================================================================
   11. Footer
   ========================================================================== */
.site-foot {
  margin-top: clamp(56px, 7vw, 92px);
  border-top: 1px solid var(--line);
  padding-top: clamp(36px, 5vw, 60px);
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.15fr);
  gap: clamp(24px, 3vw, 44px);
}
.foot-about p { font-size: 13.5px; color: var(--muted); line-height: 1.95; margin: 14px 0 18px; max-width: 34ch; }
.foot-social { display: flex; gap: 8px; }
.foot-social a {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.foot-social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.foot-social svg { width: 17px; height: 17px; }
.foot-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 16px;
}
.foot-links { list-style: none; display: grid; gap: 9px; }
.foot-links a { font-size: 13.5px; color: var(--ink-2); transition: color 0.2s, padding 0.2s; }
.foot-links a:hover { color: var(--accent); padding-inline-start: 4px; }
.foot-note { font-size: 12.5px; color: var(--muted); line-height: 1.9; }
.foot-note strong { color: var(--ink); font-weight: 700; }

.foot-wordmark {
  font-size: clamp(58px, 15.5vw, 210px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.82;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-2);
  margin-top: clamp(30px, 5vw, 56px);
  text-align: center;
  user-select: none;
  direction: ltr;
  opacity: 0.9;
}
.foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding: 20px 0 26px;
  font-size: 12px;
  color: var(--muted);
}
.foot-bottom .links { display: flex; gap: 18px; }
.foot-bottom a:hover { color: var(--accent); }

.to-top {
  position: fixed;
  inset-inline-end: 22px;
  bottom: 22px;
  z-index: 90;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background-color 0.2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ==========================================================================
   12. Archive / search heads
   ========================================================================== */
.arch-head {
  padding: clamp(28px, 4vw, 44px) 0 clamp(22px, 3vw, 30px);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(24px, 3vw, 34px);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: 0.5; }
.arch-kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 10px; }
.arch-title {
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.25;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.arch-desc { margin-top: 14px; color: var(--muted); font-size: 15px; line-height: 1.9; max-width: 62ch; }
.arch-count { margin-top: 16px; font-size: 12px; color: var(--muted); }

/* pagination */
.pagination { margin-top: clamp(32px, 4vw, 48px); }
.pagination .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .pagination .page-numbers.current { color: #06100e; }
.pagination .page-numbers.dots { border-color: transparent; }

/* ==========================================================================
   13. Single
   ========================================================================== */
.read-progress {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 3px;
  z-index: 120;
  background: transparent;
  pointer-events: none;
}
.read-progress__bar {
  height: 100%;
  width: 0;
  background: var(--accent);
}

.article { padding-top: clamp(18px, 2.6vw, 30px); }
.article-head { max-width: 860px; margin-inline: auto; text-align: center; }
.article-head .chip { margin-bottom: 18px; }
.article-title {
  font-size: clamp(28px, 4.4vw, 50px);
  line-height: 1.3;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.article-deck {
  margin: 18px auto 0;
  max-width: 62ch;
  font-size: clamp(15px, 1.6vw, 17.5px);
  line-height: 1.95;
  color: var(--muted);
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 12.5px;
  color: var(--muted);
}
.article-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.author-mini { display: inline-flex; align-items: center; gap: 9px; }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
[data-theme="dark"] .avatar { background: var(--accent); color: #06100e; }
.avatar-lg { width: 54px; height: 54px; font-size: 17px; }

.article-hero {
  max-width: 1080px;
  margin: clamp(24px, 3.4vw, 38px) auto 0;
  border-radius: clamp(16px, 2vw, 24px);
  overflow: hidden;
  aspect-ratio: 16 / 8.6;
  background: var(--surface-2);
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-hero figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 30px 18px 12px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.75);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}

.entry {
  max-width: 730px;
  margin: clamp(30px, 4vw, 44px) auto 0;
  font-size: 18px;
  line-height: 2.05;
  color: var(--ink-2);
}
.entry > * + * { margin-top: 0; }
.entry p { margin: 0 0 1.4em; }
.entry > p:first-of-type { font-size: 19.5px; color: var(--ink); }
.entry h2 {
  font-size: clamp(21px, 2.4vw, 26px);
  color: var(--ink);
  margin: 2.1em 0 0.7em;
  padding-inline-start: 14px;
  border-inline-start: 3px solid var(--accent);
  line-height: 1.5;
}
.entry h3 { font-size: 20px; color: var(--ink); margin: 1.8em 0 0.6em; }
.entry h4 { font-size: 17px; color: var(--ink); margin: 1.6em 0 0.5em; }
.entry a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry a:hover { color: var(--accent-2); }
.entry ul, .entry ol { margin: 0 0 1.4em; padding-inline-start: 1.3em; }
.entry li { margin-bottom: 0.5em; }
.entry li::marker { color: var(--accent); }
.entry blockquote {
  margin: 1.8em 0;
  padding: 20px 24px;
  background: var(--surface-2);
  border-inline-start: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 17.5px;
  line-height: 1.9;
  color: var(--ink);
}
.entry blockquote p:last-child { margin-bottom: 0; }
.entry img, .entry .wp-block-image img { border-radius: var(--radius-sm); }
.entry figure { margin: 1.8em 0; }
.entry figcaption { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }
.entry hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.entry strong { color: var(--ink); font-weight: 800; }
.entry code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.88em;
  direction: ltr;
  display: inline-block;
}
.entry pre {
  background: var(--ink);
  color: #e8efec;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  font-size: 13.5px;
  line-height: 1.7;
}
.entry pre code { background: none; padding: 0; color: inherit; }
.entry table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 14.5px; }
.entry th, .entry td { padding: 10px 12px; border: 1px solid var(--line); text-align: start; }
.entry th { background: var(--surface-2); font-weight: 700; }

.article-foot { max-width: 730px; margin: 34px auto 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0;
  border-block: 1px solid var(--line);
  flex-wrap: wrap;
}
.share-row .label { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-inline-end: 4px; }
.share-btn {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.share-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px); }
[data-theme="dark"] .share-btn:hover { color: #06100e; }
.share-btn svg { width: 17px; height: 17px; }

.author-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-top: 26px;
}
.author-box h3 { font-size: 15px; margin-bottom: 4px; }
.author-box p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.85; }

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}
.article-nav a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--surface);
  transition: border-color 0.2s, transform 0.2s;
}
.article-nav a:hover { border-color: var(--accent); transform: translateY(-2px); }
.article-nav .k { font-size: 11px; font-weight: 700; color: var(--muted); display: block; margin-bottom: 6px; }
.article-nav .t { font-size: 14px; font-weight: 700; line-height: 1.6; }

/* comments */
.comments-area {
  max-width: 730px;
  margin: clamp(38px, 5vw, 56px) auto 0;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.comments-title, .comment-reply-title { font-size: 19px; margin-bottom: 18px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comment-list .children { list-style: none; padding-inline-start: 22px; margin: 14px 0 0; }
.comment-author { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; }
.comment-author .avatar { width: 30px; height: 30px; }
.comment-metadata { font-size: 11.5px; color: var(--muted); margin: 6px 0 10px; }
.comment-content { font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.comment-respond { margin-top: 26px; }
.comment-form { display: grid; gap: 12px; }
.comment-form label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); }
.comment-form .submit {
  justify-self: start;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  padding: 12px 26px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
[data-theme="dark"] .comment-form .submit { color: #06100e; }
.comment-form .comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.comment-form .comment-form-cookies-consent label { margin: 0; }

/* ==========================================================================
   14. Page / 404
   ========================================================================== */
.page-simple { max-width: 780px; margin-inline: auto; }
.page-simple .entry { margin-top: 28px; }

.err-wrap {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 0;
}
.err-code {
  font-size: clamp(90px, 18vw, 190px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 2px var(--line-2);
  direction: ltr;
}
.err-wrap h1 { font-size: clamp(22px, 3vw, 30px); margin: 18px 0 10px; }
.err-wrap p { color: var(--muted); font-size: 15px; max-width: 44ch; margin: 0 auto 24px; }
.err-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* search results */
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form .search-field {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  padding: 12px 18px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.search-form .search-field:focus { border-color: var(--accent); }
.search-form .search-submit {
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.empty-state {
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-state h3 { color: var(--ink); font-size: 17px; margin-bottom: 8px; }

/* ==========================================================================
   15. Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .front-top { grid-template-columns: 1fr; }
  .lead-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .newsletter { grid-template-columns: 1fr; }
  .head-actions .btn { display: none; }
}

@media (max-width: 900px) {
  .nav { margin-inline-start: 0; }
  .nav-toggle { display: grid; order: -1; }
  .nav ul {
    position: fixed;
    inset: var(--head-h) 0 0 0;
    z-index: 110;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 22px var(--gutter) 40px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
    overflow-y: auto;
  }
  body.nav-open .nav ul { opacity: 1; visibility: visible; transform: none; }
  .nav li { border-bottom: 1px solid var(--line); }
  .nav a { display: block; padding: 16px 4px; font-size: 19px; font-weight: 700; border-radius: 0; }
  .nav .current-menu-item > a::after { display: none; }
  .topbar-links { display: none; }
  .article-nav { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --head-h: 64px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .lead-side { grid-template-columns: 1fr; }
  .lead-card { min-height: 400px; }
  .card-row { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
  .article-hero { aspect-ratio: 4 / 3; border-radius: 16px; }
  .entry { font-size: 17px; line-height: 2; }
  .foot-wordmark { display: none; }
  .err-actions { flex-direction: column; align-items: stretch; }
  .pagination .nav-links { justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
}

@media (max-width: 520px) {
  .brand-text em { display: none; }
  .ticker-label { display: none; }
  .topbar-date { font-size: 11.5px; }
  .author-box { grid-template-columns: 1fr; }
  .comment-list .children { padding-inline-start: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .ticker-track { animation: none; }
}
