@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&family=Aref+Ruqaa:wght@400;700&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  /* -- تم تیره (پیش‌فرض): شب لاجوردی، کاشی فیروزه‌ای، تذهیب طلایی -- */
  --board: #0a2e2a;
  --board-deep: #06201d;
  --board-line: rgba(58, 178, 176, 0.10);
  --glow-turq: rgba(42, 157, 143, 0.22);
  --glow-gold: rgba(201, 162, 39, 0.16);

  /* -- کاغذ نسخه خطی -- */
  --paper: #f3e8c9;
  --paper-alt: #e8d9ac;
  --paper-shadow: rgba(4, 14, 26, 0.55);

  /* -- جوهر و مرکب -- */
  --ink: #2b2013;
  --ink-soft: #5c4a2e;
  --ink-faint: #8a7852;

  /* -- رنگ‌های سنتی: لاجورد، فیروزه، زرشک، کهربا، سبز آبی -- */
  --lapis: #123a6b;
  --turquoise: #2a9d8f;
  --turquoise-bright: #45c2b1;
  --zereshk: #7f2634;
  --amber: #b5772e;
  --emerald: #1f6e52;
  --sabz-abi: #12806f;
  --sabz-abi-bright: #2fd6bb;
  --stamp-current: var(--amber);

  /* -- شیشه (بخش‌های مدرن با نورپردازی) -- */
  --glass-bg: rgba(10, 46, 42, 0.55);
  --glass-bg-soft: rgba(233, 244, 240, 0.06);
  --glass-border: rgba(47, 214, 187, 0.35);
  --glass-text: #f3e8c9;
  --glass-text-soft: #b8d4ce;

  /* -- تذهیب و لوازم جانبی -- */
  --gold: #c9a227;
  --gold-bright: #e6c452;
  --thread: #7a2331;
  --pin: #6b1e1e;

  --radius-card: 4px;
  --font-display: 'Aref Ruqaa', 'Vazirmatn', serif;
  --font-body: 'Vazirmatn', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  color-scheme: dark;
}

/* -- تم روشن: کاغذ عاجی زیر نور روز، همان هویت کاشی/تذهیب -- */
:root[data-theme='light'] {
  --board: #f4ecd6;
  --board-deep: #eadfbf;
  --board-line: rgba(18, 58, 107, 0.08);
  --glow-turq: rgba(42, 157, 143, 0.14);
  --glow-gold: rgba(201, 162, 39, 0.14);

  --paper: #fffdf5;
  --paper-alt: #f6ecc9;
  --paper-shadow: rgba(92, 74, 46, 0.20);

  --ink: #2b2013;
  --ink-soft: #5c4a2e;
  --ink-faint: #8a7852;

  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-bg-soft: rgba(18, 128, 111, 0.05);
  --glass-border: rgba(18, 128, 111, 0.3);
  --glass-text: #2b2013;
  --glass-text-soft: #4a6b64;

  color-scheme: light;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(ellipse 900px 700px at 20% 10%, rgba(26, 107, 107, 0.3), transparent 70%),
    radial-gradient(ellipse 800px 600px at 80% 90%, rgba(201, 162, 39, 0.08), transparent 60%),
    linear-gradient(175deg, #0a2e2a 0%, #0d4a44 40%, #1a6b6b 100%);
  background-attachment: fixed;
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.8;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

:root[data-theme='light'] body {
  background:
    radial-gradient(ellipse 900px 700px at 20% 10%, rgba(42, 157, 143, 0.15), transparent 70%),
    radial-gradient(ellipse 800px 600px at 80% 90%, rgba(201, 162, 39, 0.12), transparent 60%),
    linear-gradient(175deg, #f4ecd6 0%, #eadfbf 40%, #d8e8e4 100%);
  color: #2b2013;
}

/* ---------------------------------------------------------------------- */
/* نقوش اسلیمی، گره‌چینی و مقرنس معماری ایرانی-اسلامی فوق‌متراکم         */
/* ---------------------------------------------------------------------- */
.islimi-corner {
  position: fixed;
  width: 360px;
  height: 360px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.92;
  filter: drop-shadow(0 0 14px rgba(201, 162, 39, 0.25));
  transition: opacity var(--duration-normal), transform var(--duration-normal);
}

.islimi-corner-tr {
  top: 0;
  right: 0;
}

.islimi-corner-tl {
  top: 0;
  left: 0;
}

.islimi-corner-br {
  bottom: 0;
  right: 0;
}

.islimi-corner-bl {
  bottom: 0;
  left: 0;
}

/* حاشیه‌های عمودی گره‌چینی کناره‌های نمایشگر */
.girih-border {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 28px;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  transition: opacity var(--duration-normal);
}

.girih-border-right {
  right: 0;
}

.girih-border-left {
  left: 0;
}

.girih-border svg {
  width: 100%;
  height: 100%;
}

.path-girih-pattern {
  stroke: var(--gold-bright);
  stroke-width: 1px;
  fill: rgba(201, 162, 39, 0.04);
}

/* کتیبه و قطاربندی مقرنس زیر هدر */
.muqarnas-frieze-wrap {
  position: fixed;
  top: 62px;
  left: 0;
  right: 0;
  height: 36px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
}

.muqarnas-frieze {
  width: 100%;
  height: 100%;
}

.path-frieze-base {
  stroke: rgba(201, 162, 39, 0.4);
  stroke-width: 1.1px;
  animation-delay: 0.2s;
}

.path-frieze-arch {
  stroke: var(--gold-bright);
  stroke-width: 1.3px;
  animation-delay: 0.4s;
}

.path-frieze-sub {
  stroke: var(--turquoise-bright);
  stroke-width: 1px;
  opacity: 0.85;
  animation-delay: 0.7s;
}

/* شمسه عظیم شاهانه ۲۴ پر با گردش لایه‌ای و هاله نور */
.islimi-shamseh-wrap {
  position: fixed;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 650px;
  height: 650px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.58;
  filter: drop-shadow(0 0 30px rgba(201, 162, 39, 0.28));
}

.islimi-shamseh {
  width: 100%;
  height: 100%;
  animation: shamsehBreathe 14s ease-in-out infinite alternate;
}

.shamseh-outer-layer {
  transform-origin: 300px 300px;
  animation: shamsehRotateCw 90s linear infinite;
}

.shamseh-mid-layer {
  transform-origin: 300px 300px;
  animation: shamsehRotateCcw 60s linear infinite;
}

.shamseh-core-layer {
  transform-origin: 300px 300px;
  animation: shamsehPulseCore 6s ease-in-out infinite;
}

.shamseh-center-star {
  stroke: var(--gold-bright);
  stroke-width: 1.2px;
  fill: rgba(230, 196, 82, 0.35);
}

@keyframes shamsehRotateCw {
  to { transform: rotate(360deg); }
}

@keyframes shamsehRotateCcw {
  to { transform: rotate(-360deg); }
}

@keyframes shamsehBreathe {
  0% { transform: scale(0.96); opacity: 0.42; }
  100% { transform: scale(1.05); opacity: 0.65; }
}

@keyframes shamsehPulseCore {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px var(--gold-bright)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 12px var(--gold-bright)); }
}

/* مسیرهای وکتور اسلیمی با قابلیت تشکیل تدریجی (Line Drawing) */
.islimi-path {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: islimiDraw 3.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.path-sharafeh {
  stroke: var(--gold-bright);
  stroke-width: 1.8px;
  animation-delay: 0.1s;
}

.path-sharafeh-sub {
  stroke: rgba(201, 162, 39, 0.5);
  stroke-width: 1px;
  stroke-dasharray: 4 4;
  animation-delay: 0.3s;
}

.path-girih-bg {
  stroke: rgba(42, 157, 143, 0.45);
  stroke-width: 0.8px;
  animation-delay: 0.5s;
}

.path-primary {
  stroke: var(--gold-bright);
  stroke-width: 1.6px;
  animation-delay: 0.3s;
}

.path-secondary {
  stroke: var(--turquoise-bright);
  stroke-width: 1.2px;
  opacity: 0.85;
  animation-delay: 0.6s;
}

.path-branch {
  stroke: var(--gold);
  stroke-width: 1.1px;
  animation-delay: 0.8s;
}

.path-tendril {
  stroke: rgba(69, 194, 177, 0.8);
  stroke-width: 0.9px;
  animation-delay: 1.1s;
}

.path-leaf {
  stroke: var(--gold-bright);
  stroke-width: 1px;
  fill: rgba(201, 162, 39, 0.05);
  animation-delay: 1.3s;
}

.islimi-dot {
  fill: var(--gold-bright);
  opacity: 0;
  animation: dotPop 0.6s var(--ease-bounce) forwards;
  filter: drop-shadow(0 0 6px var(--gold-bright));
}

.islimi-corner-tr .islimi-dot:nth-of-type(1) { animation-delay: 1.5s; }
.islimi-corner-tr .islimi-dot:nth-of-type(2) { animation-delay: 1.7s; }
.islimi-corner-tr .islimi-dot:nth-of-type(3) { animation-delay: 1.9s; }
.islimi-corner-tr .islimi-dot:nth-of-type(4) { animation-delay: 2.1s; }
.islimi-corner-tr .islimi-dot:nth-of-type(5) { animation-delay: 2.3s; }
.islimi-corner-tr .islimi-dot:nth-of-type(6) { animation-delay: 2.5s; }
.islimi-corner-tr .islimi-dot:nth-of-type(7) { animation-delay: 2.7s; }

.islimi-corner-tl .islimi-dot:nth-of-type(1) { animation-delay: 1.6s; }
.islimi-corner-tl .islimi-dot:nth-of-type(2) { animation-delay: 1.8s; }
.islimi-corner-tl .islimi-dot:nth-of-type(3) { animation-delay: 2.0s; }
.islimi-corner-tl .islimi-dot:nth-of-type(4) { animation-delay: 2.2s; }
.islimi-corner-tl .islimi-dot:nth-of-type(5) { animation-delay: 2.4s; }
.islimi-corner-tl .islimi-dot:nth-of-type(6) { animation-delay: 2.6s; }
.islimi-corner-tl .islimi-dot:nth-of-type(7) { animation-delay: 2.8s; }

@keyframes islimiDraw {
  0% {
    stroke-dashoffset: 1200;
    opacity: 0.15;
  }
  40% {
    opacity: 0.85;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes dotPop {
  0% { transform: scale(0); opacity: 0; }
  80% { transform: scale(1.5); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* اجزای شمسه اسلیمی و گره‌چینی */
.shamseh-outer-ring {
  stroke: rgba(201, 162, 39, 0.4);
  stroke-width: 1px;
  animation-delay: 0.4s;
}

.shamseh-mid-ring {
  stroke: var(--turquoise-bright);
  stroke-width: 0.9px;
  animation-delay: 0.7s;
}

.shamseh-mid-ring-2 {
  stroke: rgba(201, 162, 39, 0.3);
  stroke-width: 1px;
  stroke-dasharray: 6 3;
  animation-delay: 0.9s;
}

.shamseh-toranj {
  stroke: var(--gold-bright);
  stroke-width: 1.1px;
  fill: rgba(201, 162, 39, 0.08);
  animation-delay: 0.9s;
}

.shamseh-star-16 {
  stroke: var(--gold);
  stroke-width: 1.2px;
  fill: rgba(42, 157, 143, 0.03);
  animation-delay: 1.1s;
}

.girih-square {
  stroke: rgba(47, 214, 187, 0.6);
  stroke-width: 1px;
  fill: none;
  animation-delay: 1.3s;
}

.shamseh-petal {
  stroke: var(--gold-bright);
  stroke-width: 1.3px;
  fill: rgba(201, 162, 39, 0.03);
  animation-delay: 1.5s;
}

.petal-diag {
  stroke: var(--turquoise-bright);
  animation-delay: 1.8s;
}

.shamseh-spiral {
  stroke: rgba(69, 194, 177, 0.65);
  stroke-width: 0.9px;
  animation-delay: 2.1s;
}

.shamseh-center-ring {
  stroke: var(--gold-bright);
  stroke-width: 1.8px;
  animation-delay: 0.3s;
}

.shamseh-inner-ring {
  stroke: var(--turquoise-bright);
  stroke-width: 1.2px;
  animation-delay: 0.5s;
}

.arch-keystone-ornament {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 0 0;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-bottom: none;
  background: radial-gradient(circle at 50% 40%, rgba(201, 162, 39, 0.2), transparent);
}

.arch-keystone-ornament::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 8px 1px rgba(230, 196, 82, 0.7);
}

:root[data-theme='light'] .islimi-corner {
  opacity: 0.6;
}

:root[data-theme='light'] .path-sharafeh,
:root[data-theme='light'] .path-primary,
:root[data-theme='light'] .path-branch,
:root[data-theme='light'] .shamseh-center-ring,
:root[data-theme='light'] .shamseh-petal,
:root[data-theme='light'] .shamseh-toranj,
:root[data-theme='light'] .shamseh-star-16,
:root[data-theme='light'] .shamseh-center-star,
:root[data-theme='light'] .path-girih-pattern,
:root[data-theme='light'] .path-frieze-arch {
  stroke: #b5772e;
}

:root[data-theme='light'] .path-secondary,
:root[data-theme='light'] .path-tendril,
:root[data-theme='light'] .path-girih-bg,
:root[data-theme='light'] .shamseh-mid-ring,
:root[data-theme='light'] .shamseh-spiral,
:root[data-theme='light'] .girih-square,
:root[data-theme='light'] .path-frieze-sub {
  stroke: #12806f;
}

:root[data-theme='light'] .islimi-shamseh-wrap {
  opacity: 0.32;
}

/* واکنش‌گرایی نقوش سنتی اسلیمی و معماری برای تبلت و موبایل */
@media (max-width: 1024px) {
  .islimi-corner {
    width: 200px;
    height: 200px;
    opacity: 0.75;
  }
  .islimi-shamseh-wrap {
    width: 420px;
    height: 420px;
    opacity: 0.42;
  }
  .muqarnas-frieze-wrap {
    top: 58px;
    height: 22px;
    opacity: 0.48;
  }
}

@media (max-width: 640px) {
  .islimi-corner {
    width: 120px;
    height: 120px;
    opacity: 0.55;
  }
  .islimi-shamseh-wrap {
    width: 280px;
    height: 280px;
    opacity: 0.28;
  }
  .muqarnas-frieze-wrap {
    top: 50px;
    height: 16px;
    opacity: 0.38;
  }
}

.arch-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

.minaret {
  position: fixed;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: minaretRise 3s ease-out forwards;
  pointer-events: none;
}

.minaret-left {
  left: 3%;
  bottom: 5%;
  animation-delay: 0.3s;
}

.minaret-right {
  right: 3%;
  bottom: 5%;
  animation-delay: 0.6s;
}

.minaret-shaft {
  width: 3px;
  height: 55vh;
  background: linear-gradient(to top, rgba(201, 162, 39, 0.02), rgba(201, 162, 39, 0.14), rgba(201, 162, 39, 0.02));
  position: relative;
  border-radius: 2px;
}

.minaret-shaft::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 0.5px;
  background: rgba(201, 162, 39, 0.18);
  box-shadow: 0 35px 0 rgba(201, 162, 39, 0.14), 0 70px 0 rgba(201, 162, 39, 0.11), 0 105px 0 rgba(201, 162, 39, 0.08);
}

.minaret-dome {
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 0 0;
  border: 1px solid rgba(201, 162, 39, 0.25);
  background: radial-gradient(circle at 30% 30%, rgba(201, 162, 39, 0.12), transparent);
  position: relative;
  margin-bottom: -1px;
}

.minaret-dome::after {
  content: '☽';
  position: absolute;
  top: -9px;
  right: -6px;
  font-size: 10px;
  color: rgba(201, 162, 39, 0.35);
  line-height: 1;
}

.minaret-base {
  width: 20px;
  height: 4px;
  background: linear-gradient(to right, transparent, rgba(201, 162, 39, 0.1), transparent);
  border-radius: 2px;
  margin-top: -1px;
}

@keyframes minaretRise {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  40% {
    opacity: 0.6;
    transform: translateY(-8px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.arch {
  position: fixed;
  border: 0.5px solid rgba(201, 162, 39, 0.10);
  border-bottom: none;
  border-radius: 100% 100% 0 0 / 150% 150% 0 0;
  opacity: 0;
  animation: archReveal 3s ease-out forwards;
  pointer-events: none;
}

.arch-1 {
  width: 300px;
  height: 180px;
  bottom: 5%;
  left: 5%;
  animation-delay: 0.5s;
}

.arch-2 {
  width: 450px;
  height: 280px;
  bottom: 2%;
  right: 8%;
  animation-delay: 0.8s;
}

.arch-3 {
  width: 200px;
  height: 120px;
  bottom: 8%;
  left: 40%;
  animation-delay: 1.1s;
}

@keyframes archReveal {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 640px) {
  .minaret-left { left: 1%; }
  .minaret-right { right: 1%; }
  .arch-1 { width: 180px; height: 110px; }
  .arch-2 { width: 260px; height: 160px; }
  .arch-3 { display: none; }
}

/* لایه‌ی نور زنده‌ی پشت صفحه — تنفسِ آرام نور سبزآبی زیر سطح مات سایت */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle 480px at 20% 20%, rgba(47, 214, 187, 0.14), transparent 70%),
    radial-gradient(circle 520px at 85% 70%, rgba(18, 128, 111, 0.16), transparent 70%);
  animation: bgGlowPulse 12s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bgGlowPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* بافت گره‌چینی (girih) - الگوی هندسی سنتی، بسیار ظریف و آرام در حرکت */
body::before {
  content: '';
  position: fixed;
  inset: -10% -10%;
  background-image:
    repeating-linear-gradient(45deg, var(--board-line) 0, var(--board-line) 1px, transparent 1px, transparent 34px),
    repeating-linear-gradient(-45deg, var(--board-line) 0, var(--board-line) 1px, transparent 1px, transparent 34px),
    repeating-linear-gradient(0deg, var(--board-line) 0, var(--board-line) 1px, transparent 1px, transparent 68px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  animation: girihDrift 90s linear infinite;
}

@keyframes girihDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-68px, 68px); }
}

a { color: inherit; }

/* ---------------------------------------------------------------------- */
/* حرکت پایه: ظهور تدریجی از پایین                                        */
/* ---------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------------------------------- */
/* هدر                                                                    */
/* ---------------------------------------------------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(to bottom, var(--board-deep) 75%, transparent);
  border-bottom: 1px solid var(--board-line);
  padding: 0.85rem 1.25rem;
  transition: box-shadow 0.35s var(--ease-out), padding 0.35s var(--ease-out), backdrop-filter 0.35s ease;
  width: 100%;
  box-sizing: border-box;
}

header.scrolled {
  padding: 0.6rem 1.25rem;
  box-shadow: 0 12px 30px -18px rgba(0,0,0,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-container {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  position: relative;
}

.logo::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  bottom: -4px;
  height: 2px;
  width: 32px;
  background: linear-gradient(90deg, var(--turquoise-bright), transparent);
  border-radius: 2px;
}

.logo small {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink-faint);
  letter-spacing: 0.12em;
}

@media (max-width: 640px) {
  .logo { font-size: 1.55rem; }
  .logo small { display: none; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(201, 162, 39, 0.08);
  border: 1px solid rgba(201, 162, 39, 0.3);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.45rem 0.75rem;
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease, transform 0.15s ease, border-color 0.25s ease;
}

.theme-toggle:hover { background: rgba(201, 162, 39, 0.18); border-color: rgba(201, 162, 39, 0.55); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle .icon {
  font-size: 0.9rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.45s var(--ease-bounce);
}
.theme-toggle:hover .icon { transform: rotate(25deg) scale(1.15); }

.status-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--paper-alt);
  background: rgba(42, 157, 143, 0.1);
  border: 1px solid rgba(42, 157, 143, 0.3);
  padding: 0.4rem 0.7rem;
  border-radius: 20px;
  white-space: nowrap;
  display: none;
  position: relative;
}

.status-chip::before {
  content: '';
  position: absolute;
  inset-inline-start: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--turquoise-bright);
  box-shadow: 0 0 0 0 rgba(69, 194, 177, 0.55);
  animation: pulseDot 2.4s ease-out infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(69, 194, 177, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(69, 194, 177, 0); }
  100% { box-shadow: 0 0 0 0 rgba(69, 194, 177, 0); }
}

@media (min-width: 640px) {
  .status-chip { display: inline-block; }
}

/* ---------------------------------------------------------------------- */
/* ساختار اصلی صفحه و مرکزیت کامل                                        */
/* ---------------------------------------------------------------------- */
main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* ---------------------------------------------------------------------- */
/* هیرو                                                                   */
/* ---------------------------------------------------------------------- */
.hero {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 2.75rem 1.25rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--turquoise-bright);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0 auto 0.85rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.hero .eyebrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
}

/* ستاره هشت‌پر — نماد هندسی سنتی معماری ایرانی-اسلامی، اینجا به شکل مدرن و
   مینیمال (فقط یک خط ظریف طلایی، بدون تزئین اضافه) به‌عنوان لوگوی کوچک تزئینی */
.eyebrow-star {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: var(--gold-bright);
  clip-path: polygon(
    50% 0%, 61% 35%, 93% 25%, 71% 51%, 93% 77%, 61% 67%,
    50% 100%, 39% 67%, 7% 77%, 29% 51%, 7% 25%, 39% 35%
  );
  animation: starSpin 16s linear infinite;
  opacity: 0.85;
}

@keyframes starSpin {
  to { transform: rotate(360deg); }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1.55;
  color: var(--paper);
  margin: 0 auto 0.85rem;
  text-align: center;
  text-wrap: balance;
  max-width: 780px;
  background: linear-gradient(100deg, var(--paper) 35%, var(--gold-bright) 55%, var(--paper) 75%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmerTitle 7s ease-in-out infinite;
}

@keyframes shimmerTitle {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: 0 0; }
}

@media (min-width: 640px) {
  .hero h1 { font-size: 2.45rem; }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 3.1rem; }
}

.hero p {
  color: var(--ink-faint);
  font-size: 0.95rem;
  line-height: 1.85;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  font-weight: 300;
}

/* ---------------------------------------------------------------------- */
/* یادداشتِ ورودی — پنل شیشه‌ای محرابی با نورپردازی سنتی                   */
/* ---------------------------------------------------------------------- */
.intake {
  width: 100%;
  max-width: 860px;
  margin: 1.75rem auto 0;
  padding: 1rem 1.25rem;
  position: relative;
  z-index: 1;
  isolation: isolate;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

/* دو چشمه‌ی نور محو، پشت پنل شیشه‌ای، دقیقاً حس نورپردازی زیر شیشه‌ی مات را می‌سازند */
.intake::before,
.intake::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  z-index: -1;
  pointer-events: none;
  animation: ambientBreathe 8s ease-in-out infinite;
}

.intake::before {
  width: 320px;
  height: 220px;
  top: -60px;
  right: 8%;
  background: radial-gradient(circle, var(--sabz-abi-bright), transparent 70%);
  opacity: 0.5;
}

.intake::after {
  width: 280px;
  height: 220px;
  bottom: -70px;
  left: 6%;
  background: radial-gradient(circle, var(--turquoise), transparent 70%);
  opacity: 0.4;
  animation-delay: 2.4s;
}

@keyframes ambientBreathe {
  0%, 100% { opacity: 0.32; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.12); }
}

.note-card {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  background:
    linear-gradient(155deg, var(--glass-bg-soft), transparent 60%),
    var(--glass-bg);
  color: var(--glass-text);
  border-radius: 24px;
  padding: 1.75rem 1.5rem;
  box-shadow:
    0 30px 70px -30px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  position: relative;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  animation: cardUnfold 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform-origin: center center;
  opacity: 0;
  box-sizing: border-box;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s ease;
}

@media (max-width: 640px) {
  .note-card {
    padding: 1.35rem 1.1rem;
    border-radius: 18px;
  }
}

@keyframes cardUnfold {
  0% {
    transform: scale(0.92) translateY(40px);
    opacity: 0;
  }
  50% {
    transform: scale(1.02) translateY(-6px);
    opacity: 0.95;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.note-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--sabz-abi-bright), transparent 40%, var(--gold) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
}

.note-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.7),
    0 0 40px -10px rgba(47, 214, 187, 0.25),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  border-color: rgba(47, 214, 187, 0.55);
}

.pin {
  position: absolute;
  top: -8px;
  right: 32px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--sabz-abi-bright), var(--sabz-abi) 70%);
  box-shadow: 0 0 14px 2px rgba(47, 214, 187, 0.65), 0 2px 4px rgba(0,0,0,0.4);
  animation: pinDrop 0.6s var(--ease-bounce) both;
  animation-delay: 0.3s;
}

@media (max-width: 640px) {
  .pin { right: 20px; }
}

@keyframes pinDrop {
  0% { transform: translateY(-40px) scale(0.4); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.note-card label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--sabz-abi-bright);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

textarea#newsInput {
  width: 100%;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  color: var(--glass-text);
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.7;
  resize: vertical;
  min-height: 120px;
  box-sizing: border-box;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

textarea#newsInput:focus {
  outline: none;
  border-color: var(--sabz-abi-bright);
  background: rgba(47, 214, 187, 0.06);
  box-shadow: 0 0 0 4px rgba(47, 214, 187, 0.15), 0 0 24px -6px rgba(47, 214, 187, 0.4);
}

textarea#newsInput::placeholder { color: var(--glass-text-soft); font-size: 0.92rem; }

.intake-footer {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: stretch;
  margin-top: 1.15rem;
  width: 100%;
}

@media (min-width: 640px) {
  .intake-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.char-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--glass-text-soft);
  text-align: center;
}

@media (min-width: 640px) {
  .char-count { text-align: start; }
}

.btn-analyze {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: #052420;
  background: linear-gradient(135deg, var(--sabz-abi-bright), var(--turquoise) 55%, var(--sabz-abi));
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 10px 26px -8px rgba(47, 214, 187, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
}

@media (min-width: 640px) {
  .btn-analyze { width: auto; }
}

.btn-analyze::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
  background-size: 220% 100%;
  background-position: 150% 0;
  transition: background-position 0.7s ease;
  z-index: -1;
}

.btn-analyze:hover:not(:disabled)::before { background-position: -50% 0; }

.btn-analyze:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -8px rgba(47, 214, 187, 0.7);
}

.btn-analyze:active:not(:disabled) { transform: translateY(0) scale(0.98); }

.btn-analyze:disabled {
  cursor: not-allowed;
  background: var(--ink-faint);
  color: var(--paper);
  box-shadow: none;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleAnim {
  to { transform: scale(2.6); opacity: 0; }
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(5, 36, 32, 0.3);
  border-top-color: #052420;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.progress-line {
  max-width: 900px;
  margin: 0.85rem auto 0;
  padding: 0 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold-bright);
  text-align: center;
  min-height: 1.1rem;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.progress-line.active { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------------------- */
/* نتایج → پرونده                                                        */
/* ---------------------------------------------------------------------- */
.dossier {
  max-width: 1100px;
  margin: 2.5rem auto 4rem;
  padding: 0 1.25rem;
  display: none;
  position: relative;
  z-index: 1;
}

.dossier.active { display: block; }

.case-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  text-align: center;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  animation-delay: 0.05s;
}

@keyframes fadeIn { to { opacity: 1; } }

.case-id span { color: var(--gold-bright); }

.dossier-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 900px) {
  .dossier-grid { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
}

/* -- کارت مهر اعتبار -- */
/* ترکیب سنتی/مدرن: قوس بالای کارت یادآور ایوان/محراب معماری ایرانی-اسلامی است،
   اما با خطوط تمیز، سایه نرم مدرن و بدون تزئین اضافه پیاده شده تا کارت هم‌زمان
   هویت سنتی و حس مینیمال امروزی داشته باشد. */
.folder {
  background: var(--paper);
  color: var(--ink);
  border-radius: 64px 64px 4px 4px;
  padding: 2.75rem 1.75rem 1.75rem;
  box-shadow: 0 20px 45px -18px var(--paper-shadow);
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--gold);
  opacity: 0;
  transform: translateY(26px);
  animation: folderIn 0.65s var(--ease-out) forwards;
}

/* خط قوسی نازک طلایی — با انیمیشن کشیده شدن از مرکز به اطراف هنگام هاور */
.folder::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  max-width: 220px;
  height: 40px;
  border: 2px solid transparent;
  border-bottom: none;
  border-radius: 60px 60px 0 0;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
  pointer-events: none;
}

.folder:hover::before {
  width: calc(100% - 64px);
  border-color: #e6c452;
}

/* نقطه‌ی کلیدسنگ در بالای قوس — بزرگتر و درخشان‌تر شدن هنگام هاور */
.folder::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c9a227;
  transition: transform 0.4s ease, box-shadow 0.4s ease, width 0.4s ease, height 0.4s ease;
  pointer-events: none;
}

.folder:hover::after {
  transform: translateX(-50%) scale(1.6);
  box-shadow: 0 0 20px 4px rgba(201, 162, 39, 0.5);
}

.folder:nth-of-type(1) { animation-delay: 0.08s; }
.folder:nth-of-type(2) { animation-delay: 0.2s; }

@keyframes folderIn {
  to { opacity: 1; transform: translateY(0); }
}

.folder h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(42,33,23,0.2);
}

.stamp-zone {
  display: flex;
  justify-content: center;
  margin: 0.5rem 0 1.5rem;
}

.stamp {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px double var(--stamp-current);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--stamp-current);
  transform: rotate(-9deg) scale(0.3);
  opacity: 0;
  transition: transform 0.55s var(--ease-bounce), opacity 0.35s ease, color 0.4s ease, border-color 0.4s ease;
  position: relative;
}

.stamp::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, currentColor 0deg 2.5deg, transparent 2.5deg 45deg);
  opacity: 0.16;
  animation: stampSpin 40s linear infinite;
}

@keyframes stampSpin {
  to { transform: rotate(360deg); }
}

.stamp.show {
  transform: rotate(-9deg) scale(1);
  opacity: 0.94;
  animation: stampThud 0.55s var(--ease-bounce);
}

@keyframes stampThud {
  0% { transform: rotate(-9deg) scale(0.3); }
  55% { transform: rotate(-11deg) scale(1.12); }
  75% { transform: rotate(-8deg) scale(0.95); }
  100% { transform: rotate(-9deg) scale(1); }
}

.stamp .score {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1;
  position: relative;
}

.stamp .label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.7rem;
  margin-top: 0.35rem;
  text-align: center;
  padding: 0 0.5rem;
  position: relative;
}

.criteria-list { list-style: none; }

.criteria-list li {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.8rem 0;
  border-bottom: 1px dotted rgba(42,33,23,0.18);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateX(12px);
  animation: liIn 0.5s var(--ease-out) forwards;
}

[dir='rtl'] .criteria-list li { transform: translateX(-12px); }

.criteria-list li:nth-child(1) { animation-delay: 0.35s; }
.criteria-list li:nth-child(2) { animation-delay: 0.42s; }
.criteria-list li:nth-child(3) { animation-delay: 0.49s; }
.criteria-list li:nth-child(4) { animation-delay: 0.56s; }
.criteria-list li:nth-child(5) { animation-delay: 0.63s; }

@keyframes liIn {
  to { opacity: 1; transform: translateX(0); }
}

.criteria-list li:last-child { border-bottom: none; }

.criteria-list .k {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.criteria-list .v { color: var(--ink); }

.btn-verify {
  width: 100%;
  margin-top: 1.4rem;
  background: transparent;
  border: 1px solid var(--ink-faint);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.btn-verify:hover {
  background: var(--lapis);
  border-color: var(--lapis);
  color: var(--paper);
  transform: translateY(-1px);
}

.btn-verify:active { transform: translateY(0) scale(0.98); }

/* -- منابع زنده -- */
.sources-box {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px dashed rgba(42,33,23,0.2);
}

.sources-box h3 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.7rem;
}

.source-tag {
  display: block;
  font-size: 0.82rem;
  color: var(--ink);
  background: var(--paper-alt);
  border-radius: 2px;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
  border-inline-start: 3px solid var(--stamp-current);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.3s ease;
  opacity: 0;
  transform: translateX(14px);
  animation: sourceIn 0.5s var(--ease-out) forwards;
}

[dir='rtl'] .source-tag { transform: translateX(-14px); }

.source-tag:nth-child(1) { animation-delay: 0.1s; }
.source-tag:nth-child(2) { animation-delay: 0.18s; }
.source-tag:nth-child(3) { animation-delay: 0.26s; }
.source-tag:nth-child(4) { animation-delay: 0.34s; }
.source-tag:nth-child(5) { animation-delay: 0.42s; }
.source-tag:nth-child(6) { animation-delay: 0.5s; }

@keyframes sourceIn {
  to { opacity: 1; transform: translateX(0); }
}

.source-tag:hover {
  transform: translateX(-4px);
  box-shadow: 0 6px 16px -8px rgba(0,0,0,0.4);
}

[dir='rtl'] .source-tag:hover { transform: translateX(4px); }

.source-tag .src-name {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-faint);
  display: block;
  margin-top: 0.2rem;
}

.no-sources {
  font-size: 0.8rem;
  color: var(--ink-faint);
  font-style: italic;
}

/* -- برگه‌های روایت -- */
.tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  position: relative;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 0.6rem 0.3rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-faint);
  background: var(--paper-alt);
  border-radius: 2px 2px 0 0;
  /* هر سه تب همیشه یک خط رنگی دائمی زیرشان دارند، نه فقط تب فعال؛ این خط با
     رنگ همان جناح تن‌رنگ می‌گیرد تا بصری «هر بخش زیرش خط دارد» رعایت شود */
  border-bottom: 3px solid rgba(127, 38, 52, 0.22);
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.tab[data-party='osoul'] { border-bottom-color: rgba(127, 38, 52, 0.3); }   /* زرشکی - اصول‌گرا */
.tab[data-party='eslah'] { border-bottom-color: rgba(18, 58, 107, 0.32); }  /* لاجوردی - اصلاح‌طلب */
.tab[data-party='mian']  { border-bottom-color: rgba(18, 128, 111, 0.32); } /* سبزآبی - میانه‌رو */

.tab.active {
  color: var(--ink);
  background: var(--paper);
}

.tab.active[data-party='osoul'] { border-bottom-color: var(--zereshk); }
.tab.active[data-party='eslah'] { border-bottom-color: var(--lapis); }
.tab.active[data-party='mian']  { border-bottom-color: var(--sabz-abi); }

.tab-indicator {
  position: absolute;
  bottom: -1px;
  height: 3px;
  background: var(--zereshk);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), width 0.35s var(--ease-out), background 0.3s ease;
  width: 33.33%;
  transform: translateX(0);
}

.narrative-text {
  background: var(--paper);
  border-radius: var(--radius-card);
  padding: 1.4rem;
  min-height: 160px;
  font-size: 0.95rem;
  color: var(--ink);
  box-shadow: 0 20px 45px -18px var(--paper-shadow);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.narrative-text.switching {
  opacity: 0;
  transform: translateY(6px);
}

/* -- توصیه: یادداشت گیره‌خورده -- */
.advice-box {
  grid-column: 1 / -1;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius-card);
  padding: 1.6rem 1.75rem;
  margin-top: 0.5rem;
  box-shadow: 0 20px 45px -18px var(--paper-shadow);
  position: relative;
  border-inline-start: 5px solid var(--stamp-current);
  opacity: 0;
  transform: translateY(20px);
  animation: folderIn 0.6s var(--ease-out) forwards;
  animation-delay: 0.55s;
}

.advice-header {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.advice-body {
  font-size: 0.95rem;
  line-height: 1.95;
  text-align: justify;
}

.advice-body .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--zereshk);
  margin-inline-start: 2px;
  vertical-align: middle;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ---------------------------------------------------------------------- */
/* پیام خطا                                                               */
/* ---------------------------------------------------------------------- */
.error-note {
  display: none;
  max-width: 900px;
  margin: 1.25rem auto 0;
  padding: 0 1.25rem;
}

.error-note.active {
  display: block;
  animation: shake 0.45s var(--ease-out);
}

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.error-note .inner {
  background: rgba(127, 38, 52, 0.14);
  border: 1px solid rgba(127, 38, 52, 0.45);
  color: #f0b8c0;
  border-radius: 3px;
  padding: 0.9rem 1.1rem;
  font-size: 0.88rem;
}

/* ---------------------------------------------------------------------- */
/* فوتر                                                                   */
/* ---------------------------------------------------------------------- */
footer {
  text-align: center;
  padding: 2rem 1.25rem;
  border-top: 1px solid var(--board-line);
  color: var(--ink-faint);
  font-size: 0.78rem;
  position: relative;
  z-index: 1;
}

/* ---------------------------------------------------------------------- */
/* دسترسی‌پذیری و انیمیشن‌های کاهش‌یافته                                   */
/* ---------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

@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;
  }
  body::before, body::after { animation: none !important; }
  .minaret, .arch, .note-card, .folder, .reveal, .stamp, .source-tag, .compare-row, .islimi-shamseh, .islimi-corner {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .islimi-path {
    stroke-dashoffset: 0 !important;
    animation: none !important;
    opacity: 1 !important;
  }
  .islimi-dot {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ---------------------------------------------------------------------- */
/* آیکون‌های مینیمال با تولتیپ شیشه‌ای                                      */
/* ---------------------------------------------------------------------- */
.icon-btn, .has-tooltip {
  position: relative;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.25s ease;
  color: var(--paper);
}

.icon-btn:hover {
  background: rgba(201, 162, 39, 0.12);
  border-color: rgba(201, 162, 39, 0.3);
  transform: translateY(-2px);
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: rgba(10, 46, 42, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 162, 39, 0.35);
  color: var(--gold-bright);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.5), 0 0 12px rgba(201, 162, 39, 0.15);
}

:root[data-theme='light'] .tooltip {
  background: rgba(255, 253, 245, 0.95);
  border-color: rgba(181, 119, 46, 0.4);
  color: #7f2634;
  box-shadow: 0 8px 20px -4px rgba(43, 32, 19, 0.18);
}

.has-tooltip:hover .tooltip,
.has-tooltip:focus-visible .tooltip,
.icon-btn:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}

/* ---------------------------------------------------------------------- */
/* ردیف لیبل ورودی + دکمه پیست                                            */
/* ---------------------------------------------------------------------- */
.intake-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.intake-label-row label {
  margin-bottom: 0; /* استایل پیش‌فرض label را خنثی می‌کند چون حالا داخل فلکس است */
}

.btn-paste {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.35);
  color: var(--gold-bright);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.btn-paste:hover {
  background: rgba(201, 162, 39, 0.2);
  border-color: rgba(201, 162, 39, 0.6);
}

.btn-paste:active { transform: scale(0.95); }

.btn-paste .paste-icon { font-size: 0.85rem; line-height: 1; }

.btn-paste.pasted {
  background: rgba(42, 157, 143, 0.18);
  border-color: rgba(42, 157, 143, 0.55);
  color: var(--turquoise-bright);
}

/* ---------------------------------------------------------------------- */
/* ردیف دکمه‌های نمونه آماده آزمون                                         */
/* ---------------------------------------------------------------------- */
.quick-samples-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding-top: 0.5rem;
}

.quick-samples-label {
  font-size: 0.72rem;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}

.sample-pill {
  background: var(--paper-alt);
  border: 1px solid rgba(42, 33, 23, 0.15);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.73rem;
  padding: 0.3rem 0.65rem;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sample-pill:hover {
  background: var(--paper);
  border-color: var(--gold);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sample-pill:active {
  transform: scale(0.96);
}

/* ---------------------------------------------------------------------- */
/* خلاصه مقایسه‌ای سبک AllSides / Ground News                             */
/* نکات مشترک بین جناح‌ها + مهم‌ترین اختلاف، پیش از ورود به تب‌های جزئی    */
/* ---------------------------------------------------------------------- */
.compare-summary {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.compare-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: var(--paper-alt);
  border-radius: 3px;
  padding: 0.85rem 1rem;
  opacity: 0;
  transform: translateY(10px);
  animation: liIn 0.5s var(--ease-out) forwards;
}

.compare-shared { animation-delay: 0.25s; border-inline-start: 3px solid var(--emerald); }
.compare-diff { animation-delay: 0.32s; border-inline-start: 3px solid var(--zereshk); }

.compare-icon {
  font-size: 1.1rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.compare-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.3rem;
}

.compare-row p {
  font-size: 0.87rem;
  color: var(--ink);
  line-height: 1.75;
}

/* ---------------------------------------------------------------------- */
/* بخش تحلیل پوشش خبری (News Coverage Analysis & Media Bias Distribution) */
/* ---------------------------------------------------------------------- */
.coverage-folder {
  grid-column: 1 / -1;
  background: var(--paper);
  color: var(--ink);
  border-radius: 64px 64px 4px 4px;
  padding: 2.5rem 1.75rem 1.75rem;
  box-shadow: 0 20px 45px -18px var(--paper-shadow);
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--turquoise);
  opacity: 0;
  transform: translateY(26px);
  animation: folderIn 0.65s var(--ease-out) forwards;
  animation-delay: 0.35s;
}

.coverage-folder::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  max-width: 220px;
  height: 40px;
  border: 2px solid transparent;
  border-bottom: none;
  border-radius: 60px 60px 0 0;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
  pointer-events: none;
}

.coverage-folder:hover::before {
  width: calc(100% - 64px);
  border-color: var(--turquoise-bright);
}

.coverage-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(42, 33, 23, 0.2);
}

.coverage-header-flex h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.coverage-volume-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  background: var(--paper-alt);
  color: var(--ink-soft);
  border: 1px solid rgba(42, 33, 23, 0.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.coverage-spectrum-card {
  background: var(--paper-alt);
  border-radius: 4px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
  border-inline-start: 4px solid var(--gold);
}

.spectrum-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.spectrum-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

.spectrum-note {
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* نوار چندبخشی سهم رسانه‌ها */
.coverage-bar {
  display: flex;
  height: 22px;
  width: 100%;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-bottom: 1rem;
  background: rgba(42, 33, 23, 0.1);
}

.coverage-seg {
  height: 100%;
  transition: width 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.seg-osoul {
  background: linear-gradient(90deg, #962d3e, #7f2634);
}

.seg-eslah {
  background: linear-gradient(90deg, #1d4d8a, #123a6b);
}

.seg-mian {
  background: linear-gradient(90deg, #1b9b87, #12806f);
}

/* راهنمای رنگ و درصدها */
.coverage-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--paper);
  padding: 0.6rem 0.85rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px -4px var(--paper-shadow);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-osoul { background: var(--zereshk); box-shadow: 0 0 8px rgba(127, 38, 52, 0.5); }
.dot-eslah { background: var(--lapis); box-shadow: 0 0 8px rgba(18, 58, 107, 0.5); }
.dot-mian  { background: var(--sabz-abi); box-shadow: 0 0 8px rgba(18, 128, 111, 0.5); }

.legend-info {
  display: flex;
  flex-direction: column;
}

.legend-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.legend-pct {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

/* کارت‌های جزئیات نقطه کور و قاب‌بندی */
.coverage-grid-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .coverage-grid-details {
    grid-template-columns: 1fr 1fr;
  }
}

.coverage-info-card {
  background: var(--paper-alt);
  border-radius: 4px;
  padding: 1.1rem 1.25rem;
  border-top: 2px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-blindspot {
  border-top-color: var(--amber);
}

.card-framing {
  border-top-color: var(--turquoise);
}

.coverage-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.coverage-info-card p {
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.8;
  text-align: justify;
}

.coverage-summary-box {
  background: var(--paper-alt);
  border-radius: 4px;
  padding: 1.1rem 1.3rem;
  border-inline-start: 4px solid var(--emerald);
}

.coverage-summary-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.coverage-summary-box p {
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.85;
}

/* ---------------------------------------------------------------------- */
/* بهبود نمایش و ترازبندی در تبلت و موبایل (Responsive & Centering)        */
/* ---------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .nav-container {
    padding: 0 1rem;
  }
  
  .islimi-corner {
    width: 220px;
    height: 220px;
    opacity: 0.65;
  }

  .girih-border {
    width: 18px;
    opacity: 0.3;
  }
  
  .islimi-shamseh-wrap {
    width: 480px;
    height: 480px;
    opacity: 0.42;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 2rem;
  }

  .nav-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
  }

  .logo {
    font-size: 1.35rem;
    text-align: center;
    width: 100%;
    justify-content: center;
  }

  .header-actions {
    justify-content: center;
    width: 100%;
    gap: 0.6rem;
  }

  .hero {
    padding: 2.2rem 1rem 0.5rem;
    text-align: center;
  }

  .eyebrow {
    font-size: 0.75rem;
    padding: 0.35rem 0.9rem;
    margin-bottom: 1rem;
  }

  .hero h1 {
    font-size: 1.75rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
  }

  .hero p {
    font-size: 0.9rem;
    padding: 0 0.5rem;
  }

  .intake {
    padding: 0.75rem 0.75rem;
    margin-top: 1.25rem;
  }

  .note-card {
    padding: 1.25rem 1rem;
    border-radius: 18px;
  }

  .pin {
    right: 18px;
    top: -7px;
  }

  .islimi-corner {
    width: 130px;
    height: 130px;
    opacity: 0.45;
  }

  .girih-border {
    display: none;
  }

  .islimi-shamseh-wrap {
    width: 340px;
    height: 340px;
    opacity: 0.3;
  }

  .dossier {
    padding: 0 0.75rem;
    margin-top: 1.5rem;
  }

  .folder {
    padding: 2.25rem 1.1rem 1.25rem;
    border-radius: 40px 40px 4px 4px;
  }

  .tabs {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .tab {
    font-size: 0.78rem;
    padding: 0.55rem 0.25rem;
  }

  .stamp {
    width: 125px;
    height: 125px;
  }

  .stamp .score {
    font-size: 1.75rem;
  }

  .advice-box {
    padding: 1.25rem 1rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .eyebrow {
    font-size: 0.7rem;
    gap: 0.35rem;
  }

  .intake-label-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .btn-paste {
    align-self: flex-end;
  }

  .btn-analyze {
    font-size: 0.95rem;
    padding: 0.8rem 1.2rem;
  }

  .compare-row {
    padding: 0.75rem 0.85rem;
  }
}
