@font-face {
  font-family: "Vazirmatn Local";
  src: url("/fonts/vazirmatn.woff2") format("woff2");
  font-display: swap;
  font-weight: 100 900;
}

:root {
  --ink: #101b3f;
  --muted: #66708b;
  --primary: #2958ea;
  --primary-deep: #173ab4;
  --violet: #6f49dd;
  --coral: #ff705d;
  --mint: #dff8ee;
  --surface: #ffffff;
  --soft: #f4f7ff;
  --line: #dce4f6;
  --shadow: 0 24px 70px rgba(23, 42, 94, .11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 18%, rgba(89, 224, 183, .14), transparent 25rem),
    radial-gradient(circle at 92% 8%, rgba(87, 116, 255, .12), transparent 27rem),
    #fbfcff;
  font-family: "Vazirmatn Local", Tahoma, Arial, sans-serif;
  line-height: 1.95;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--primary);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(41, 88, 234, .28);
  outline-offset: 3px;
}

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

header.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  padding: 14px 0;
  color: var(--ink);
  background: rgba(251, 252, 255, .86);
  border-bottom: 1px solid rgba(220, 228, 246, .82);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  border-radius: 13px;
  background: linear-gradient(145deg, #315ff0, #2043c5);
  box-shadow: 0 9px 22px rgba(41, 88, 234, .28);
  font-size: 1.15rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 9px 13px;
  color: #4e5976;
  border-radius: 12px;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
  transition: color .2s ease, background .2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--primary);
  background: #eef3ff;
}

main {
  padding: 34px 0 86px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: #7a849d;
  font-size: .88rem;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.editorial-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 390px;
  padding: clamp(34px, 6vw, 76px);
  border: 1px solid #d5def6;
  border-radius: 42px;
  background:
    linear-gradient(120deg, rgba(255,255,255,.96) 0 52%, rgba(237,242,255,.9) 52% 100%);
  box-shadow: var(--shadow);
}

.editorial-hero::before,
.editorial-hero::after {
  position: absolute;
  z-index: -1;
  content: "";
  border-radius: 999px;
}

.editorial-hero::before {
  inset: -140px auto auto -90px;
  width: 360px;
  height: 360px;
  border: 1px dashed rgba(41, 88, 234, .24);
  box-shadow: 0 0 0 55px rgba(41, 88, 234, .035), 0 0 0 110px rgba(41, 88, 234, .025);
}

.editorial-hero::after {
  inset: auto 6% -105px auto;
  width: 280px;
  height: 280px;
  background: linear-gradient(145deg, rgba(79, 220, 181, .34), rgba(111, 73, 221, .09));
}

.hero-copy {
  width: min(690px, 100%);
}

.eyebrow,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  color: var(--primary);
  border: 1px solid #d7e0fb;
  border-radius: 999px;
  background: #f1f5ff;
  font-size: .82rem;
  font-weight: 850;
}

.eyebrow::before {
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(255, 112, 93, .13);
}

.editorial-hero h1 {
  max-width: 680px;
  margin: 18px 0 14px;
  font-size: clamp(2.25rem, 5.5vw, 4.6rem);
  line-height: 1.23;
  letter-spacing: -.055em;
}

.editorial-hero h1 span {
  color: var(--primary);
}

.editorial-hero p {
  max-width: 660px;
  margin: 0;
  color: #56617d;
  font-size: clamp(1rem, 1.7vw, 1.15rem);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 27px;
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #46516d;
  font-size: .9rem;
  font-weight: 720;
}

.hero-stat b {
  color: var(--ink);
  font-size: 1.2rem;
}

.article-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 38px 0 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  line-height: 1.5;
}

.section-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .93rem;
}

.article-search {
  position: relative;
  width: min(390px, 100%);
}

.article-search svg {
  position: absolute;
  top: 50%;
  right: 17px;
  width: 21px;
  color: #7b87a4;
  transform: translateY(-50%);
}

.article-search input {
  width: 100%;
  height: 54px;
  padding: 0 50px 0 18px;
  color: var(--ink);
  border: 1px solid #d8e0f2;
  border-radius: 17px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 10px 28px rgba(23, 42, 94, .06);
  font: inherit;
}

.article-search input::placeholder {
  color: #919ab0;
}

.grid.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.article-card {
  position: relative;
  display: flex;
  min-height: 285px;
  flex-direction: column;
  padding: 27px;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid #dce4f4;
  border-radius: 27px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 14px 42px rgba(23, 42, 94, .055);
  text-decoration: none;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.article-card::after {
  position: absolute;
  top: -42px;
  left: -42px;
  width: 112px;
  height: 112px;
  content: "";
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(41,88,234,.09), rgba(87,214,180,.14));
  transition: transform .25s ease;
}

.article-card:hover {
  border-color: #bfcdf2;
  box-shadow: 0 20px 55px rgba(23, 42, 94, .1);
  transform: translateY(-5px);
}

.article-card:hover::after {
  transform: scale(1.18);
}

.article-card:first-child {
  grid-column: 1 / -1;
  min-height: 320px;
  padding: clamp(28px, 5vw, 48px);
  background:
    linear-gradient(118deg, #13255d 0 48%, #214ed6 100%);
  color: #fff;
  border: 0;
  box-shadow: 0 24px 65px rgba(25, 53, 142, .22);
}

.article-card:first-child::after {
  top: auto;
  right: auto;
  bottom: -140px;
  left: -90px;
  width: 350px;
  height: 350px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
  box-shadow: 0 0 0 50px rgba(255,255,255,.035);
}

.article-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.article-kind {
  color: var(--primary);
  font-size: .82rem;
  font-weight: 850;
}

.article-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #75809b;
  border: 1px solid #e0e6f3;
  border-radius: 12px;
  background: #f8faff;
  font-size: .78rem;
  font-weight: 800;
}

.article-card:first-child .article-kind {
  color: #cfe0ff;
}

.article-card:first-child .article-number {
  color: #fff;
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.11);
}

.article-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.17rem, 2.3vw, 1.45rem);
  line-height: 1.65;
  letter-spacing: -.018em;
}

.article-card:first-child h2 {
  max-width: 780px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.55;
}

.article-card p {
  margin: 0 0 22px;
  color: #68738d;
  font-size: .95rem;
  line-height: 1.9;
}

.article-card:first-child p {
  max-width: 790px;
  color: #d9e3ff;
  font-size: 1.01rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  color: var(--primary);
  font-size: .88rem;
  font-weight: 850;
}

.read-more::after {
  content: "←";
  transition: transform .2s ease;
}

.article-card:hover .read-more::after {
  transform: translateX(-4px);
}

.article-card:first-child .read-more {
  color: #fff;
}

.empty-state {
  display: none;
  padding: 42px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #cdd7ed;
  border-radius: 24px;
  background: #fff;
}

/* Article detail */
.article-shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 790px) minmax(230px, 300px);
  align-items: start;
  justify-content: space-between;
  gap: 34px;
}

article.guide {
  position: relative;
  min-width: 0;
  padding: clamp(28px, 5vw, 58px);
  overflow: hidden;
  border: 1px solid #dbe3f5;
  border-radius: 34px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
}

article.guide::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 7px;
  content: "";
  background: linear-gradient(90deg, var(--violet), var(--primary), #46ccb0);
}

.article-head {
  padding: 0 0 34px;
  color: var(--ink);
  border-bottom: 1px solid #e7ebf5;
  background: transparent;
}

.article-head h1 {
  margin: 17px 0 16px;
  font-size: clamp(2rem, 4.7vw, 3.55rem);
  line-height: 1.45;
  letter-spacing: -.045em;
}

.lead {
  margin: 0;
  color: #4d5874;
  font-size: clamp(1.04rem, 2vw, 1.17rem);
  line-height: 2.05;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 20px;
  margin-top: 22px;
  color: #77819a;
  font-size: .84rem;
}

article.guide > section {
  scroll-margin-top: 100px;
}

article.guide > section h2,
.check h2,
.related h2 {
  margin: 44px 0 15px;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.6vw, 1.65rem);
  line-height: 1.65;
  letter-spacing: -.02em;
}

article.guide > section h2::before,
.check h2::before,
.related h2::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 10px;
  content: "";
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(255,112,93,.12);
}

article.guide p,
article.guide li {
  color: #39445f;
  font-size: 1.02rem;
}

article.guide ul {
  padding-right: 22px;
}

article.guide li {
  margin-block: 8px;
}

.source,
.check {
  padding: 23px 25px;
  border: 1px solid #d9e3f8;
  border-right: 5px solid var(--primary);
  border-radius: 19px;
  background: #f5f8ff;
  box-shadow: none;
}

.source {
  margin: 26px 0;
  color: #44506d;
  font-size: .95rem;
}

.check {
  margin: 42px 0 0;
  background: linear-gradient(145deg, #f2f6ff, #effbf7);
}

.check h2 {
  margin-top: 0;
}

.related {
  padding-top: 4px;
}

.related .grid {
  display: grid;
  gap: 11px;
}

.related .item {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  color: var(--ink);
  border: 1px solid #dce4f3;
  border-radius: 17px;
  background: #fff;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease;
}

.related .item:hover {
  border-color: #bac9f1;
  transform: translateX(-4px);
}

.related .item small {
  color: var(--primary);
  font-weight: 800;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
  padding-top: 25px;
  border-top: 1px solid #e3e8f3;
}

.links a {
  padding: 10px 15px;
  color: var(--primary);
  border: 1px solid #d7e0f6;
  border-radius: 13px;
  background: #f5f8ff;
  text-decoration: none;
  font-size: .89rem;
  font-weight: 780;
}

.toc {
  position: sticky;
  top: 104px;
  padding: 23px;
  border: 1px solid #dce4f4;
  border-radius: 24px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 15px 45px rgba(23,42,94,.07);
  backdrop-filter: blur(14px);
}

.toc strong {
  display: block;
  margin-bottom: 11px;
  color: var(--ink);
  font-size: .96rem;
}

.toc a {
  display: block;
  padding: 8px 12px;
  color: #66708a;
  border-right: 2px solid #e0e6f4;
  text-decoration: none;
  font-size: .82rem;
  line-height: 1.75;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.toc a:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: #f3f6ff;
}

footer.site-footer {
  padding: 36px 20px;
  color: #737d96;
  text-align: center;
  border-top: 1px solid #e5eaf4;
  background: rgba(255,255,255,.62);
  font-size: .88rem;
}

.site-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 800;
}

@media (max-width: 900px) {
  .site-nav a:nth-child(2),
  .site-nav a:nth-child(3) {
    display: none;
  }

  .editorial-hero {
    min-height: 340px;
    border-radius: 31px;
    background: rgba(255,255,255,.9);
  }

  .article-layout {
    display: block;
  }

  .toc {
    display: none;
  }
}

@media (max-width: 680px) {
  .wrap,
  .article-shell {
    width: min(100% - 24px, 1180px);
  }

  header.site-header {
    padding: 8px 0;
  }

  .header-inner {
    min-height: 52px;
    gap: 8px;
  }

  .brand {
    font-size: .98rem;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 12px;
  }

  .site-nav a {
    padding: 7px 9px;
    font-size: .78rem;
  }

  main {
    padding: 20px 0 58px;
  }

  .breadcrumb {
    margin: 0 2px 15px;
    font-size: .8rem;
  }

  .editorial-hero {
    min-height: 0;
    padding: 28px 24px 34px;
    border-radius: 26px;
  }

  .editorial-hero::before {
    width: 230px;
    height: 230px;
  }

  .editorial-hero::after {
    width: 180px;
    height: 180px;
  }

  .editorial-hero h1 {
    font-size: clamp(2.15rem, 13vw, 3rem);
  }

  .hero-stats {
    display: grid;
    gap: 8px;
  }

  .article-tools {
    align-items: stretch;
    flex-direction: column;
    margin-top: 28px;
  }

  .grid.article-grid {
    grid-template-columns: 1fr;
  }

  .article-card,
  .article-card:first-child {
    grid-column: auto;
    min-height: 0;
    padding: 23px;
    border-radius: 22px;
  }

  .article-card:first-child h2 {
    font-size: 1.36rem;
  }

  article.guide {
    padding: 28px 22px;
    border-radius: 25px;
  }

  .article-head {
    padding-bottom: 26px;
  }

  .article-head h1 {
    margin-top: 14px;
    font-size: 2rem;
    line-height: 1.52;
  }

  article.guide > section h2,
  .check h2,
  .related h2 {
    margin-top: 36px;
    font-size: 1.3rem;
  }

  article.guide p,
  article.guide li {
    font-size: .98rem;
  }

  .source,
  .check {
    padding: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
  }
}
