:root {
  --cream: #f6efe4;
  --paper: #fffcf7;
  --navy: #0c2340;
  --azure: #2b6cb0;
  --gold: #c9a227;
  --terracotta: #c45c3a;
  --ink: #1c1917;
}

html {
  scroll-behavior: smooth;
}

@font-face {
  font-family: Vazirmatn;
  src: local("Vazirmatn"), local("Vazirmatn RD"), local("Vazir");
  font-display: swap;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  font-feature-settings: "ss01" on, "kern" on;
}

::selection {
  background: #dbe8f4;
  color: var(--navy);
}

:focus-visible {
  outline: 2px solid var(--azure);
  outline-offset: 3px;
}

.gold-hairline {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.logo-mark {
  width: 28px;
  height: 28px;
}

.article-card {
  height: auto;
  align-self: start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -16px rgba(12, 35, 64, 0.28);
}

.article-card img,
.hero-media img,
.category-tile img {
  transition: transform 0.6s ease;
}

.article-card:hover img,
.hero-media:hover img,
.category-tile:hover img {
  transform: scale(1.05);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.ticker {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 42s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(50%);
  }
}

.lead-credit {
  color: #c45c3a;
  font-weight: 800;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  background: #eef5fb;
  color: var(--navy);
  padding: 0.2rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.tag-chip button {
  color: var(--terracotta, #c45c3a);
  font-size: 0.9rem;
  line-height: 1;
}

.prose-fa p {
  margin-bottom: 1.35rem;
  line-height: 2;
  font-size: 1.125rem;
  color: #2a2622;
}

.prose-fa h2 {
  margin: 2.2rem 0 1rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
}

.pull-quote {
  border-right: 3px solid var(--gold);
  padding: 0.4rem 1.25rem 0.4rem 0;
  margin: 2rem 0;
  font-size: 1.35rem;
  line-height: 1.9;
  color: var(--navy);
  font-weight: 600;
}

.fact-box {
  background: linear-gradient(180deg, #eef5fb, #f7fafc);
  border: 1px solid #d5e4f0;
  border-right: 4px solid var(--azure);
}

.search-overlay,
.menu-drawer {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.search-overlay.is-open,
.menu-drawer.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.menu-panel {
  transform: translateX(-1.25rem);
  transition: transform 0.25s ease;
}

.menu-drawer.is-open .menu-panel {
  transform: translateX(0);
}

.category-chip.is-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.category-tile {
  min-height: 280px;
}

.prose-fa table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.prose-fa th,
.prose-fa td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.75rem;
}

.prose-fa img {
  border-radius: 1rem;
  margin: 1.5rem 0;
}

.prose-fa a {
  color: var(--azure);
  text-decoration: underline;
}

.admin-shell {
  min-height: 100vh;
}

.admin-table td,
.admin-table th {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.flash-ok {
  background: #e8f1f8;
  color: var(--navy);
  border-right: 4px solid var(--azure);
}

.flash-err {
  background: #fdece7;
  color: #7a2e1b;
  border-right: 4px solid var(--terracotta);
}

.media-item.is-selected {
  outline: 3px solid var(--azure);
  outline-offset: 1px;
}

.tox-tinymce {
  border-radius: 1rem !important;
  border-color: var(--line) !important;
}

@media (max-width: 767px) {
  .ticker-track {
    animation-duration: 28s;
  }

  .prose-fa p {
    font-size: 1.05rem;
  }
}
