/* ==========================================================================
   اسکیلیکس (Skilliks) — سیستم طراحی ایرانی مدرن (Persian Editorial Tech)
   فیروزه‌ای عمیق · عاجی گرم · طلایی زعفرانی · کاملاً ریسپانسیو و RTL
   ========================================================================== */

:root {
  /* پس‌زمینه‌ها و سطوح گرم شبیه کاغذ دست‌ساز و حاشیه فرش */
  --bg: #FAF8F4;
  --bg-2: #F2EEE6;
  --bg-soft: #F5F1E9;
  --surface: #FFFFFF;
  --glass: rgba(255, 255, 255, .86);
  --glass-strong: rgba(255, 255, 255, .96);
  --glass-line: rgba(15, 118, 110, .12);

  /* متن‌ها و خطوط */
  --ink: #13202E;
  --ink-soft: #3B4959;
  --ink-mute: #647485;
  --ink-muted: #647485;
  --line: rgba(19, 32, 46, .09);
  --line-strong: rgba(19, 32, 46, .17);

  /* پالت برند: فیروزه‌ای نیشابور + زعفران و طلایی + لاجوردی عمیق */
  --brand: #0F766E;
  --brand-dark: #115E59;
  --brand-deeper: #134E4A;
  --brand-soft: rgba(15, 118, 110, .10);
  --accent: #C88218;
  --accent-bright: #D97706;
  --accent-soft: rgba(217, 119, 6, .12);
  --crimson: #9F2B38;
  --sand: #EAB308;

  /* وضعیت‌ها */
  --danger: #B91C1C;
  --danger-soft: rgba(185, 28, 28, .10);
  --warn: #B45309;
  --warn-soft: rgba(217, 119, 6, .13);
  --ok: #15803D;
  --ok-soft: rgba(21, 128, 61, .11);

  /* فرم و سایه‌ها */
  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 30px;
  --shadow-xs: 0 1px 2px rgba(19, 32, 46, .05);
  --shadow-sm: 0 4px 14px -6px rgba(19, 32, 46, .08);
  --shadow-md: 0 16px 38px -18px rgba(19, 32, 46, .22);
  --shadow-lg: 0 28px 70px -36px rgba(19, 32, 46, .34);
  --ring: 0 0 0 3px rgba(15, 118, 110, .20);

  --font: "Vazirmatn", "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --maxw: 1200px;
  --head-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.85;
  background-color: var(--bg);
  background-image:
    radial-gradient(54rem 30rem at 92% -6%, rgba(15, 118, 110, .10), transparent 62%),
    radial-gradient(44rem 28rem at 6% 4%, rgba(217, 119, 6, .09), transparent 60%),
    radial-gradient(38rem 24rem at 50% 106%, rgba(159, 43, 56, .06), transparent 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

a { color: var(--brand-dark); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand); }

h1, h2, h3, h4 { margin: 0 0 .6rem; line-height: 1.4; font-weight: 800; letter-spacing: -.015em; color: var(--ink); }
h1 { font-size: clamp(1.75rem, 3.4vw, 2.55rem); }
h2 { font-size: clamp(1.22rem, 2vw, 1.55rem); }
h3 { font-size: 1.06rem; }
h4 { font-size: .95rem; }
p { margin: 0 0 .9rem; }
code, pre, kbd { font-family: var(--mono); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-xs); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: 22px; }

.skip {
  position: absolute; inset-inline-start: -9999px; top: 10px; z-index: 120;
  background: #fff; padding: 10px 16px; border-radius: var(--r-xs); box-shadow: var(--shadow-md);
}
.skip:focus { inset-inline-start: 12px; }

/* نوار ظریف حاشیه ایرانی بالای هدر */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 248, 244, .88);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-block-start: 3px solid var(--brand);
  border-block-end: 1px solid var(--line);
}
.head-inner {
  display: flex; align-items: center; gap: 16px;
  min-height: var(--head-h); flex-wrap: nowrap;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: block; flex: none;
  box-shadow: 0 10px 22px -12px rgba(15, 118, 110, .75);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-word { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.brand-word span { color: var(--brand); }
.brand-text small { font-size: .66rem; font-weight: 500; color: var(--ink-mute); margin-top: 2px; }

.head-search {
  flex: 1 1 260px; max-width: 400px; display: flex; align-items: stretch;
  background: #fff; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 3px; transition: box-shadow .18s, border-color .18s;
}
.head-search:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.head-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 7px 14px;
  font-family: inherit; font-size: .9rem; color: var(--ink); border-radius: 999px;
}
.head-search input:focus { outline: none; box-shadow: none; }
.head-search button {
  border: 0; border-radius: 999px; padding: 0 16px; cursor: pointer;
  background: var(--brand); color: #fff;
  font-family: inherit; font-size: .83rem; font-weight: 700;
  transition: background .15s ease;
}
.head-search button:hover { background: var(--brand-dark); }

.head-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.head-nav { display: flex; align-items: center; gap: 4px; font-size: .9rem; }
.head-nav > a, .head-nav > form > button {
  padding: 8px 12px; border-radius: 999px; color: var(--ink-soft); font-weight: 600;
  border: 0; background: transparent; font-family: inherit; font-size: .88rem; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.head-nav > a:hover, .head-nav > form > button:hover { background: var(--brand-soft); color: var(--brand-dark); }
.head-nav > a.active { color: var(--brand-dark); background: var(--brand-soft); }
.nav-sep { width: 1px; height: 20px; background: var(--line-strong); margin-inline: 4px; }
.nav-burger {
  display: none; width: 42px; height: 42px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line-strong); background: #fff;
  align-items: center; justify-content: center; gap: 4px; flex-direction: column;
}
.nav-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); }

/* --------------------------------------------------------------- buttons */
.btn {
  --btn-bg: #fff;
  --btn-ink: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--btn-bg); color: var(--btn-ink);
  font-family: inherit; font-size: .9rem; font-weight: 700; cursor: pointer;
  transition: transform .15s ease, box-shadow .18s ease, background .18s ease, border-color .15s ease;
  white-space: nowrap; text-align: center;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); color: var(--btn-ink); border-color: var(--brand); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: transparent; color: #fff;
  box-shadow: 0 12px 26px -14px rgba(15, 118, 110, .85);
}
.btn-primary:hover { color: #fff; background: linear-gradient(135deg, var(--brand-dark), var(--brand-deeper)); box-shadow: 0 16px 32px -14px rgba(15, 118, 110, .95); }
.btn-accent {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  border-color: transparent; color: #fff;
  box-shadow: 0 12px 24px -14px rgba(217, 119, 6, .75);
}
.btn-accent:hover { color: #fff; filter: brightness(.96); }
.btn-ghost { background: rgba(255,255,255,.72); border-color: var(--line-strong); color: var(--ink-soft); }
.btn-soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-dark); }
.btn-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.btn-sm { padding: 6px 14px; font-size: .81rem; }
.btn-lg { padding: 13px 26px; font-size: .96rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; width: 38px; height: 38px; border-radius: 12px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------------------------------------------------------- layout helpers */
main { padding: 32px 0 72px; min-height: 62vh; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 275px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.grid > * { min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.stack > * + * { margin-block-start: 14px; }
.muted { color: var(--ink-mute); }
.small { font-size: .84rem; }
.center { text-align: center; }
.mt-0 { margin-block-start: 0; } .mb-0 { margin-block-end: 0; }
.nowrap { white-space: nowrap; }
.split-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px; margin: 0 0 18px;
}
.section-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.section-head a { font-size: .86rem; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; color: var(--brand); }
.section-head a:hover { text-decoration: underline; text-underline-offset: 4px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700;
  color: var(--brand-deeper); background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(15, 118, 110, .2);
  padding: 5px 14px; border-radius: 999px; box-shadow: var(--shadow-xs);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-bright); box-shadow: 0 0 0 4px var(--accent-soft); }

/* ------------------------------------------------------------------- hero */
.hero { position: relative; padding: 12px 0 10px; }
.hero-shell {
  position: relative; overflow: hidden; padding: clamp(26px, 4.2vw, 54px);
  border-radius: var(--r-xl);
  border: 1px solid rgba(15, 118, 110, .18);
  background:
    radial-gradient(38rem 24rem at 92% 6%, rgba(15, 118, 110, .14), transparent 62%),
    radial-gradient(30rem 20rem at 8% 95%, rgba(217, 119, 6, .14), transparent 62%),
    linear-gradient(180deg, #FFFFFF, #FBF9F4);
  box-shadow: var(--shadow-lg);
}
/* نقش هندسی ظریف الهام‌گرفته از حاشیه فرش ایرانی */
.hero-shell::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .38;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(15, 118, 110, .18) 1px, transparent 0);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 80% 70% at 20% 20%, #000, transparent 78%);
}
.hero-shell::after {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand-deeper), var(--brand), var(--accent-bright), var(--crimson), var(--brand));
  opacity: .85;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 32px; align-items: center;
}
.hero h1 { margin: 14px 0 12px; font-size: clamp(1.9rem, 3.8vw, 2.85rem); letter-spacing: -.025em; line-height: 1.32; }
.hero h1 em {
  font-style: normal; color: var(--brand);
  background: linear-gradient(180deg, transparent 62%, rgba(217, 119, 6, .22) 62%);
  padding-inline: 4px; border-radius: 4px;
}
.hero .lead { font-size: clamp(.95rem, 1.25vw, 1.05rem); color: var(--ink-soft); max-width: 58ch; margin-bottom: 22px; }
.hero-search {
  display: flex; gap: 6px; padding: 6px; margin: 0 0 16px; max-width: 610px;
  background: #fff; border: 1.5px solid rgba(15, 118, 110, .25);
  border-radius: 999px; box-shadow: var(--shadow-sm);
}
.hero-search:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.hero-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 16px;
  font-family: inherit; font-size: .96rem; color: var(--ink); border-radius: 999px;
}
.hero-search input:focus { outline: none; box-shadow: none; }
.hero-search .btn { border-radius: 999px; padding-inline: 24px; }

.hero-visual { position: relative; display: none; }
.hero-code {
  border-radius: var(--r-md); overflow: hidden;
  border: 1px solid rgba(253, 230, 138, .22);
  background: linear-gradient(180deg, #10202C, #0B1620);
  box-shadow: var(--shadow-lg);
}
.hero-code .bar {
  display: flex; align-items: center; gap: 6px; padding: 11px 15px;
  background: rgba(255, 255, 255, .04); border-block-end: 1px solid rgba(255, 255, 255, .08);
}
.hero-code .bar i { width: 9px; height: 9px; border-radius: 50%; background: #E11D48; }
.hero-code .bar i:nth-child(2) { background: #F59E0B; }
.hero-code .bar i:nth-child(3) { background: #14B8A6; }
.hero-code .bar span { margin-inline-start: auto; font-size: .72rem; color: #94A3B8; font-family: var(--mono); }
.hero-code pre {
  margin: 0; padding: 18px 20px 22px; direction: ltr; text-align: left;
  font-size: .78rem; line-height: 1.95; color: #E2E8F0;
  font-family: var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
  unicode-bidi: isolate;
}
.hero-code .k { color: #FCD34D; }
.hero-code .s { color: #5EEAD4; }
.hero-code .c { color: #64748B; }
.hero-code .fa-block {
  display: block; direction: rtl; text-align: right;
  font-family: var(--font); font-size: .82rem; color: #E2E8F0;
  margin-top: 6px; padding: 10px 12px; border-radius: 10px;
  background: rgba(20, 184, 166, .09); border-inline-start: 2px solid #14B8A6;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px;
  background: #fff; border: 1px solid rgba(15, 118, 110, .18);
  border-radius: 999px; box-shadow: var(--shadow-sm); font-size: .78rem; font-weight: 700; color: var(--ink);
}
.hero-badge em { font-style: normal; color: var(--ok); }

@media (min-width: 901px) {
  .hero-visual { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
  .hero-badge { align-self: flex-start; }
}

.hero-stats {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin-block-start: 28px; padding-block-start: 22px;
  border-block-start: 1px dashed rgba(15, 118, 110, .2);
}
.hero-stats div {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 12px 16px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .82); border: 1px solid var(--line);
}
.hero-stats strong { font-size: 1.28rem; color: var(--brand-deeper); font-weight: 800; }
.hero-stats span { font-size: .76rem; color: var(--ink-mute); }

.agent-strip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-block-start: 18px; }
.agent-strip .label { font-size: .78rem; color: var(--ink-mute); font-weight: 600; }
.agent-pill {
  font-size: .76rem; font-weight: 600; color: var(--ink-soft);
  background: #fff; border: 1px solid var(--line);
  padding: 4px 11px; border-radius: 999px;
}

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  min-width: 0;
}
.card-flat { box-shadow: none; background: var(--bg-soft); }
.card h3 { margin-bottom: .4rem; }
.card-link {
  display: block; color: inherit;
  transition: transform .18s ease, box-shadow .22s ease, border-color .18s ease;
}
.card-link:hover {
  color: inherit; transform: translateY(-3px);
  box-shadow: var(--shadow-md); border-color: rgba(15, 118, 110, .38);
}
.card-title { font-weight: 800; font-size: 1rem; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.card-desc { color: var(--ink-soft); font-size: .875rem; line-height: 1.8; }

/* کارت مهارت با حس کاشی و نقش ایرانی */
.skill-card { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; height: 100%; }
.skill-cover {
  position: relative; height: 108px; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 14px; overflow: hidden;
}
.skill-cover::before {
  content: ""; position: absolute; inset: 0;
  background: var(--cover, linear-gradient(135deg, #0F766E, #134E4A));
}
.skill-cover::after {
  content: ""; position: absolute; inset: 0; opacity: .18;
  background-image: radial-gradient(circle at 2px 2px, #FEF3C7 1.2px, transparent 0);
  background-size: 18px 18px;
}
.skill-cover .glyph {
  position: relative; z-index: 1; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.2rem; font-weight: 800; color: #FFFBEB;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(253, 230, 138, .45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.skill-cover .cover-badges { position: relative; z-index: 1; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.skill-cover .cover-badge {
  font-size: .71rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); color: var(--ink); box-shadow: var(--shadow-xs);
}
.skill-cover .cover-badge-pro {
  background: #FEF3C7; color: #92400E; border: 1px solid rgba(217, 119, 6, .3);
}
.skill-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.skill-card .card-title { font-size: .98rem; line-height: 1.5; }
.skill-card .card-desc { min-height: 3.2em; }
.skill-card .meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: .75rem; color: var(--ink-mute); align-items: center; }
.skill-card .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-block-start: auto; padding-block-start: 6px; }
.skill-card .row { gap: 6px; }

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 999px; font-size: .73rem; font-weight: 700; white-space: nowrap;
  background: var(--bg-2); color: var(--ink-soft); border: 1px solid transparent;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-brand { background: var(--brand-soft); color: var(--brand-dark); }
.badge-accent { background: var(--accent-soft); color: #92400E; }
.badge-free { background: rgba(15, 118, 110, .09); color: var(--brand-deeper); }
.badge-pro {
  background: linear-gradient(135deg, #92400E, #D97706); color: #FFFBEB;
  box-shadow: 0 6px 16px -10px rgba(180, 83, 9, .8);
}
.badge-pro::before { content: "✦"; font-size: .82em; }
.tag {
  font-size: .72rem; color: var(--ink-soft); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 13px;
  font-family: inherit; font-size: .8rem; color: var(--ink-soft); background: #fff;
  cursor: pointer; transition: .16s ease;
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.chip.current, .chip-active { background: var(--brand); color: #fff !important; border-color: var(--brand); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------- tables */
.table-wrap {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md); border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-xs);
}
table.data { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.data th, table.data td {
  padding: 12px 14px; text-align: start; vertical-align: middle;
  border-block-end: 1px solid var(--line);
}
table.data th {
  background: var(--bg-soft); font-weight: 700; font-size: .78rem;
  color: var(--ink-mute); white-space: nowrap;
}
table.data tbody tr:last-child td { border-block-end: 0; }
table.data tbody tr:hover td { background: rgba(15, 118, 110, .035); }
table.data td.actions { white-space: nowrap; }
table.data td.actions form { display: inline-flex; gap: 4px; margin: 0; }
.cell-ltr { direction: ltr; text-align: start; }
.cell-muted { color: var(--ink-mute); font-size: .8rem; }

/* ----------------------------------------------------------------- forms */
label.field { display: block; margin-bottom: 14px; font-size: .86rem; font-weight: 700; color: var(--ink-soft); }
label.field input, label.field select, label.field textarea,
input.input, select.input, textarea.input {
  width: 100%; margin-block-start: 7px; padding: 11px 13px;
  border: 1px solid var(--line-strong); border-radius: var(--r-xs);
  font-family: inherit; font-size: .92rem; background: #fff; color: var(--ink);
  font-weight: 400; transition: border-color .16s, box-shadow .16s;
}
input.input, select.input { height: 42px; }
label.field input:focus, label.field select:focus, label.field textarea:focus,
input.input:focus, select.input:focus, textarea.input:focus {
  outline: none; border-color: var(--brand); box-shadow: var(--ring);
}
textarea { resize: vertical; min-height: 120px; }
.check { display: flex; align-items: flex-start; gap: 9px; font-weight: 400; font-size: .86rem; margin-bottom: 12px; }
.check input { width: 17px; height: 17px; margin-block-start: 5px; accent-color: var(--brand); }
.form-hint { font-size: .77rem; color: var(--ink-mute); font-weight: 400; }
.form-card { max-width: 470px; margin: 34px auto; padding: 30px; border-radius: var(--r-lg); }
.form-card.wide { max-width: 760px; }
.form-card h1 { font-size: 1.5rem; }
.form-title { margin-bottom: 4px; }
.form-sub { color: var(--ink-mute); font-size: .88rem; margin-bottom: 20px; }

.alert {
  padding: 12px 15px; border-radius: var(--r-xs); font-size: .87rem;
  margin-bottom: 14px; border: 1px solid; line-height: 1.75;
}
.alert-error { background: var(--danger-soft); border-color: rgba(185,28,28,.22); color: #991B1B; }
.alert-ok { background: var(--ok-soft); border-color: rgba(21,128,61,.22); color: #166534; }
.alert-info { background: var(--brand-soft); border-color: rgba(15,118,110,.22); color: var(--brand-deeper); }
.alert-warn { background: var(--warn-soft); border-color: rgba(180,83,9,.25); color: #92400E; }

/* --------------------------------------------------------- filters/sidebar */
.with-sidebar { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.with-sidebar > * { min-width: 0; }
.sidebar { position: sticky; top: calc(var(--head-h) + 16px); }
.sidebar .card { padding: 18px; }
.filter-group { margin-bottom: 14px; }
.filter-group h4 { font-size: .82rem; margin: 0 0 8px; color: var(--ink-mute); font-weight: 700; }
.filter-group ul { list-style: none; margin: 0; padding: 0; font-size: .86rem; }
.filter-group li { margin-bottom: 3px; }
.filter-group a { color: var(--ink-soft); display: flex; justify-content: space-between; gap: 8px; padding: 4px 8px; border-radius: 8px; }
.filter-group a:hover { color: var(--brand-dark); background: var(--brand-soft); }
.filter-group a.current { color: var(--brand-deeper); font-weight: 700; background: var(--brand-soft); }
.filter-toggle { display: none; }

/* ------------------------------------------------------------- pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin-block-start: 30px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 11px;
  border-radius: 12px; border: 1px solid var(--line-strong);
  background: #fff; font-size: .86rem; color: var(--ink-soft); font-weight: 600;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand-dark); }
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .disabled { opacity: .45; }

/* ------------------------------------------------------------ skill detail */
.detail-head {
  padding: 26px; border-radius: var(--r-lg); background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.breadcrumb { display: flex; gap: 8px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-mute); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-mute); }
.breadcrumb a:hover { color: var(--brand-dark); }
.detail-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-title h1 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 2rem); }
.meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-block-start: 20px; }
@media (max-width: 900px) { .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 430px) { .meta-grid { grid-template-columns: 1fr; } }
.meta-item { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; min-width: 0; }
.meta-item dt { font-size: .72rem; color: var(--ink-mute); margin: 0; }
.meta-item dd { margin: 3px 0 0; font-size: .875rem; font-weight: 700; overflow-wrap: anywhere; }

.skill-body-wrap { position: relative; }
.skill-body {
  background: #0F1D28; color: #E2E8F0; border-radius: var(--r-md); padding: 24px;
  font-family: var(--mono); font-size: .82rem; line-height: 2; white-space: pre-wrap;
  word-break: break-word; max-height: 640px; overflow: auto;
  direction: ltr; text-align: left; position: relative;
  border: 1px solid rgba(253, 230, 138, .15);
  box-shadow: var(--shadow-md);
}
.skill-body::after {
  content: attr(data-watermark); position: absolute; inset: 0; pointer-events: none;
  display: grid; place-items: center; font-family: var(--font); font-size: 1.4rem;
  color: rgba(255,255,255,.05); transform: rotate(-18deg); letter-spacing: 2px;
}
.skill-preview {
  background: #fff; border: 1px dashed var(--line-strong);
  border-radius: var(--r-md); padding: 20px; white-space: pre-wrap;
  font-size: .9rem; color: var(--ink-soft); position: relative;
  max-height: 320px; overflow: hidden; line-height: 1.95;
}
.skill-preview::before {
  content: ""; position: absolute; inset-block-end: 0; inset-inline: 0; height: 100px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.98));
}
.paywall {
  position: relative; z-index: 2; margin-block-start: -30px;
  border-radius: var(--r-md); padding: 22px;
  background: linear-gradient(180deg, #FFFDF8, #FFFFFF);
  border: 1px solid rgba(217, 119, 6, .35);
  box-shadow: var(--shadow-md);
}
.paywall h3 { margin-bottom: .3rem; font-size: 1.05rem; }

/* ---------------------------------------------------------------- pricing */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 262px), 1fr)); gap: 20px; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 10px; padding: 26px 22px; }
.plan.featured {
  border-color: rgba(15, 118, 110, .35);
  background: linear-gradient(160deg, rgba(15, 118, 110, .07), rgba(217, 119, 6, .06)), #fff;
  box-shadow: var(--shadow-md);
}
.plan .price { font-size: 1.7rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.plan .price small { font-size: .76rem; font-weight: 500; color: var(--ink-mute); }
.plan ul { list-style: none; padding: 0; margin: 8px 0 0; font-size: .87rem; color: var(--ink-soft); }
.plan ul li { padding-inline-start: 24px; position: relative; margin-bottom: 7px; }
.plan ul li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; color: var(--brand); font-weight: 800; }
.plan .btn { margin-block-start: auto; }

/* ------------------------------------------------------------------ stats */
.stat {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 18px; box-shadow: var(--shadow-xs);
  min-width: 0;
}
.stat dt { font-size: .76rem; color: var(--ink-mute); font-weight: 600; }
.stat dd { margin: 5px 0 0; font-size: 1.45rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.stat small { display: block; font-size: .73rem; color: var(--ink-mute); font-weight: 400; margin-block-start: 2px; }

/* ================================================================= ADMIN
   سایدبار لاجوردی-فیروزه‌ای عمیق + فضای محتوای کاملاً بدون بریدگی و ریسپانسیو
   ================================================================= */
.admin-shell {
  display: grid; grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh; max-width: 100vw; overflow-x: clip;
}
.admin-side {
  position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, #0E2229, #132C35 55%, #0D1E25);
  color: #CBD5E1; padding: 18px 14px 28px;
  border-inline-end: 1px solid rgba(253, 230, 138, .12);
}
.admin-brand {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px;
  color: #fff; font-weight: 800; font-size: .95rem;
}
.admin-brand:hover { color: #fff; }
.admin-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
.admin-brand small {
  display: block; font-size: .68rem; color: #94A3B8; font-weight: 500;
  max-width: 148px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-nav-group { margin-bottom: 16px; }
.admin-nav-group > span {
  display: block; padding: 0 10px 7px; font-size: .68rem; letter-spacing: .04em;
  color: #7FA3AE; font-weight: 700;
}
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border-radius: 10px; color: #CBD5E1; font-size: .86rem; font-weight: 600;
  transition: background .15s, color .15s;
}
.admin-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-nav a.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; box-shadow: 0 8px 20px -12px rgba(15, 118, 110, .95);
}
.admin-nav a .ico { width: 18px; height: 18px; opacity: .88; flex: none; }
.admin-nav a .count {
  margin-inline-start: auto; background: rgba(255,255,255,.14); color: #fff;
  font-size: .68rem; padding: 1px 7px; border-radius: 999px;
}
.admin-side-foot {
  margin-block-start: 20px; padding: 12px; border-radius: 12px;
  background: rgba(255,255,255,.06); font-size: .76rem; color: #94A3B8;
  overflow-wrap: anywhere;
}
.admin-side-foot a { color: #E2E8F0; }

.admin-main { background: var(--bg); min-height: 100vh; min-width: 0; width: 100%; overflow-x: clip; }
.admin-top {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; min-height: 62px;
  background: rgba(250, 248, 244, .92);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-block-end: 1px solid var(--line);
}
.admin-top .crumbs { font-size: .84rem; color: var(--ink-mute); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; }
.admin-top .crumbs strong { color: var(--ink); font-weight: 700; }
.admin-top-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-content { padding: 24px; max-width: 1320px; width: 100%; min-width: 0; }
.admin-side-toggle { display: none; }

.admin-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
}
.admin-panel-head h1 { font-size: 1.4rem; margin: 0; }
.admin-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-xs); padding: 20px; min-width: 0;
}
.admin-card + .admin-card { margin-block-start: 18px; }
.admin-card h3 { font-size: .98rem; margin-bottom: 12px; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.quick-action {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: var(--r-sm);
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  font-weight: 700; font-size: .87rem; transition: .16s ease; min-width: 0;
}
.quick-action:hover { border-color: var(--brand); color: var(--brand-dark); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.quick-action .qi {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark); font-size: 1rem; flex: none;
}
.quick-action small { display: block; font-weight: 500; color: var(--ink-mute); font-size: .74rem; }
.bulk-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 12px;
  background: var(--brand-soft); border: 1px solid rgba(15, 118, 110, .2);
}
.table-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.table-toolbar .input { height: 38px; }

/* ---------------------------------------------------------------- footer */
.site-foot {
  margin-block-start: 64px; padding: 48px 0 28px;
  border-block-start: 2px solid rgba(15, 118, 110, .18);
  background: linear-gradient(180deg, #F5F1E9, #EFEADF);
}
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 26px; }
.foot-grid h4 { font-size: .86rem; margin-bottom: 12px; color: var(--ink); }
.foot-grid a { color: var(--ink-soft); display: block; margin-bottom: 7px; font-size: .84rem; }
.foot-grid a:hover { color: var(--brand); }
.foot-bottom {
  border-block-start: 1px solid var(--line); margin-block-start: 30px; padding-block-start: 16px;
  font-size: .78rem; color: var(--ink-mute);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ----------------------------------------------------------- misc blocks */
.empty-state { text-align: center; padding: 48px 22px; border-radius: var(--r-md); }
.empty-state .big { font-size: 2rem; margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .86rem; }
.kv dt { color: var(--ink-mute); }
.kv dd { margin: 0; font-weight: 600; }
.progress { height: 7px; background: rgba(19, 32, 46, .08); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent-bright)); border-radius: 99px; }
.divider { height: 1px; background: var(--line); margin-block: 20px; border: 0; }
.copy-input { display: flex; gap: 6px; }
.copy-input input { direction: ltr; font-family: var(--mono); font-size: .78rem; }

/* ------------------------------------------------------------------- auth */
.auth-wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 22px;
  max-width: 980px; margin: 18px auto 0; align-items: stretch;
}
.auth-aside {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 30px;
  border-radius: var(--r-lg); border: 1px solid rgba(15, 118, 110, .18);
  background:
    radial-gradient(26rem 18rem at 90% 0%, rgba(15, 118, 110, .14), transparent 60%),
    radial-gradient(20rem 14rem at 0% 100%, rgba(217, 119, 6, .14), transparent 60%),
    #FFFFFF;
}
.auth-aside h2 { font-size: 1.32rem; margin: 6px 0 2px; }
.auth-list { margin: 0; padding-inline-start: 20px; color: var(--ink-soft); font-size: .89rem; }
.auth-list li { margin-bottom: 8px; }

/* ------------------------------------------------------------- components */
.qi {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark); font-size: .95rem;
  font-weight: 800; flex: none;
}
details.card > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "＋"; font-size: .95rem; color: var(--brand); font-weight: 800; }
details.card[open] > summary::after { content: "−"; }
details.card[open] { box-shadow: var(--shadow-md); border-color: rgba(15, 118, 110, .28); }

/* ---- glass dropdown navigation ---- */
.nav-drop { position: relative; }
.nav-drop-btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .88rem; font-weight: 600;
  color: var(--ink-soft); background: none; border: 0; cursor: pointer;
  padding: 8px 12px; border-radius: 999px; transition: background .16s ease, color .16s ease;
}
.nav-drop-btn:hover, .nav-drop[data-open="true"] .nav-drop-btn, .nav-drop-btn.active {
  background: var(--brand-soft); color: var(--brand-dark);
}
.nav-drop-btn .chev { opacity: .65; transition: transform .2s ease; }
.nav-drop:hover .chev, .nav-drop[data-open="true"] .chev { transform: rotate(180deg); opacity: 1; }

.drop-panel {
  position: absolute; inset-block-start: calc(100% + 10px); inset-inline-start: 0; z-index: 60;
  width: 470px; max-width: calc(100vw - 32px); padding: 14px;
  border-radius: 20px; background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid rgba(15, 118, 110, .18);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.985); transform-origin: top;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav-drop:hover .drop-panel,
.nav-drop:focus-within .drop-panel,
.nav-drop[data-open="true"] .drop-panel { opacity: 1; visibility: visible; transform: none; }
.drop-panel-wide { width: 580px; }
.drop-label { font-size: .72rem; font-weight: 700; color: var(--ink-mute); margin: 2px 0 8px; }
.drop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.drop-grid-1 { grid-template-columns: 1fr; gap: 3px; }
.drop-item {
  display: flex; flex-direction: column; gap: 1px; padding: 8px 10px;
  border-radius: 12px; color: var(--ink); transition: background .15s ease, color .15s ease;
}
.drop-item strong { font-size: .86rem; font-weight: 700; }
.drop-item span { font-size: .72rem; color: var(--ink-mute); line-height: 1.65; }
.drop-item:hover { background: var(--brand-soft); color: var(--brand-deeper); }
.drop-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.drop-chips a {
  font-size: .75rem; padding: 5px 11px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deeper); font-weight: 600;
}
.drop-chips a:hover { background: var(--brand); color: #fff; }
.drop-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px; padding-top: 10px; border-block-start: 1px solid var(--line); font-size: .78rem;
}
.drop-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }

/* ---- FAQ ---- */
.faq-head { padding: 6px 0 2px; }
.faq-head h1 { margin: 8px 0 6px; }
.faq-group { margin-top: 26px; scroll-margin-top: 110px; }
.faq-group h2 { font-size: 1.05rem; margin-bottom: 10px; }
.faq-list { display: grid; gap: 8px; }
.faq-item {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-xs); overflow: hidden;
}
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; font-size: .92rem; font-weight: 700; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brand); font-weight: 800; font-size: 1.1rem; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { color: var(--brand-dark); }
.faq-body { padding: 0 16px 14px; }
.faq-body p { margin: 0 0 8px; font-size: .89rem; line-height: 1.95; color: var(--ink-soft); }
.faq-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; }

/* ---- public floating offline assistant (scoped cleanly) ---- */
.assistant:not(.admin-chat) {
  position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 92;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.assistant-fab {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px;
  border-radius: 999px; border: 1px solid rgba(253, 230, 138, .4); color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deeper));
  box-shadow: 0 18px 36px -16px rgba(15, 118, 110, .85);
  font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}
.assistant-fab:hover { transform: translateY(-2px); box-shadow: 0 24px 44px -18px rgba(15, 118, 110, .95); }
.assistant.assistant-open .assistant-fab { display: none; }
.assistant:not(.admin-chat) .assistant-panel {
  width: 366px; max-width: calc(100vw - 32px);
  max-height: min(580px, calc(100vh - 130px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  border: 1px solid rgba(15, 118, 110, .2);
  box-shadow: var(--shadow-lg);
}
.assistant-panel[hidden] { display: none; }
.assistant:not(.admin-chat) .assistant-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-block-end: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(15, 118, 110, .10), rgba(217, 119, 6, .08));
}
.assistant:not(.admin-chat) .assistant-head strong { display: block; font-size: .95rem; }
.assistant:not(.admin-chat) .assistant-head .small { font-size: .7rem; color: var(--ink-mute); }
.assistant-close { border: 0; background: none; cursor: pointer; color: var(--ink-mute); font-size: 1.35rem; line-height: 1; padding: 0 2px; }
.assistant-close:hover { color: var(--ink); }
.assistant-log { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 14px; overflow-y: auto; }
.assistant:not(.admin-chat) .msg { max-width: 90%; padding: 10px 13px; border-radius: 15px; font-size: .84rem; line-height: 1.85; }
.assistant:not(.admin-chat) .msg p { margin: 0; white-space: pre-line; }
.assistant:not(.admin-chat) .msg.bot { align-self: flex-start; background: var(--bg-soft); border: 1px solid var(--line); border-start-start-radius: 6px; }
.assistant:not(.admin-chat) .msg.user { align-self: flex-end; background: var(--brand); color: #fff; border-start-end-radius: 6px; }
.msg .msg-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.msg .msg-links a { font-size: .73rem; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deeper); font-weight: 600; }
.msg .msg-links a:hover { background: var(--brand); color: #fff; }
.msg.typing { color: var(--ink-mute); font-size: .8rem; }
.assistant:not(.admin-chat) .assistant-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.assistant:not(.admin-chat) .assistant-chips .chip { font-size: .73rem; padding: 5px 10px; }
.assistant-form { display: flex; gap: 8px; padding: 10px 12px; border-block-start: 1px solid var(--line); background: var(--bg); }
.assistant-form input {
  flex: 1; min-width: 0; font: inherit; font-size: .84rem; padding: 9px 12px;
  border-radius: 11px; border: 1px solid var(--line-strong); background: #fff;
}
.assistant-form input:focus { outline: none; box-shadow: var(--ring); border-color: var(--brand); }
.assistant-foot { padding: 0 14px 12px; margin: 0; font-size: .68rem !important; line-height: 1.7; color: var(--ink-mute); }

/* ---- learning centre / docs ---- */
.doc { max-width: 780px; }
.doc h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.4; margin-bottom: .5rem; }
.doc h2 { font-size: 1.18rem; margin: 1.9rem 0 .6rem; padding-inline-start: .6rem; border-inline-start: 3px solid var(--brand); }
.doc h3 { font-size: 1rem; margin: 1.3rem 0 .4rem; }
.doc p, .doc li { font-size: .93rem; line-height: 1.95; color: var(--ink-soft); }
.doc ul, .doc ol { padding-inline-start: 1.2rem; margin: .5rem 0 .9rem; }
.doc li { margin-bottom: .35rem; }
.doc strong { color: var(--ink); }
.doc code {
  font-family: var(--mono); font-size: .82em; background: var(--brand-soft);
  color: var(--brand-deeper); padding: .12em .42em; border-radius: 6px; direction: ltr; display: inline-block;
}
.doc pre {
  direction: ltr; text-align: left; background: #0F1D28; color: #E2E8F0; border-radius: 14px;
  padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: .78rem; line-height: 1.75;
  margin: .6rem 0 1rem; border: 1px solid rgba(253,230,138,.12);
}
.doc pre code { background: none; color: inherit; padding: 0; display: inline; font-size: 1em; }
.doc table { width: 100%; border-collapse: collapse; margin: .7rem 0 1.2rem; font-size: .85rem; }
.doc th, .doc td { padding: .5rem .6rem; border-block-end: 1px solid var(--line); text-align: start; vertical-align: top; }
.doc th { font-size: .78rem; color: var(--ink-mute); font-weight: 600; }
.doc blockquote {
  margin: .8rem 0; padding: .8rem 1rem; border-radius: 12px;
  background: var(--accent-soft); border-inline-start: 3px solid var(--accent-bright); font-size: .88rem;
}
.harness-card { display: flex; flex-direction: column; gap: .45rem; }
.harness-card .meta { font-size: .72rem; color: var(--ink-mute); }
.harness-card code {
  font-size: .74rem; direction: ltr; unicode-bidi: isolate; display: inline-block;
  font-family: var(--mono); color: var(--brand-deeper); background: var(--brand-soft);
  padding: .1em .4em; border-radius: 6px; max-width: 100%;
}
.learn-hero { display: grid; gap: 1rem; grid-template-columns: 1.35fr .65fr; align-items: center; }
.learn-hero .stat-stack { display: grid; gap: .6rem; }
.learn-hero .stat-stack div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .75rem .95rem; }
.learn-hero .stat-stack strong { display: block; font-size: 1.35rem; color: var(--brand-deeper); }
.learn-hero .stat-stack span { font-size: .74rem; color: var(--ink-mute); }
.toc { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.toc a { font-size: .78rem; padding: .3rem .75rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deeper); font-weight: 600; }

/* ------------------------------------------------------- install & tabs */
.code-block {
  direction: ltr; text-align: left; background: #0F1D28; color: #E2E8F0;
  border: 1px solid rgba(253,230,138,.14); border-radius: var(--r-md);
  padding: 12px 14px; margin: 8px 0; overflow-x: auto;
  font-family: var(--mono); font-size: .76rem; line-height: 1.75;
}
.code-block code { color: inherit; background: none; padding: 0; font-size: 1em; }
.btn.copied { color: var(--brand-dark); border-color: var(--brand); }
.install-table td { padding: 6px 0; vertical-align: top; }
.install-table td:first-child { width: 38%; color: var(--ink-mute); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; border-bottom: 1px solid var(--line); }
.tab {
  padding: 10px 18px; border-radius: var(--r-sm) var(--r-sm) 0 0;
  border: 1px solid transparent; border-bottom: none;
  color: var(--ink-soft); font-size: .88rem; font-weight: 700;
}
.tab:hover { color: var(--brand-dark); background: rgba(255,255,255,.7); }
.tab.active {
  background: #fff; border-color: var(--line);
  color: var(--brand-deeper); box-shadow: 0 -2.5px 0 var(--brand) inset;
}
.mini-list { margin: 0; display: grid; gap: 8px; }
.mini-list > div { display: flex; justify-content: space-between; gap: 10px; font-size: .83rem; }
.mini-list dt { color: var(--ink-mute); }
.mini-list dd { margin: 0; text-align: left; font-weight: 600; }
.fact-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fact-chip {
  font-size: .74rem; padding: 4px 11px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deeper);
  border: 1px solid rgba(15, 118, 110, .18); font-weight: 600;
}
.fact-chip.warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(180, 83, 9, .22); }
.chip.chip-warn { border-style: dashed; }

/* ---- admin guide & admin assistant (strictly scoped) ---- */
.guide-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); }
.guide-card { padding: 16px 18px; }
.guide-card h3 { color: var(--brand-deeper); }
.guide-card p, .assistant-block p { font-size: .87rem; line-height: 1.95; margin: 6px 0; }
.guide-code {
  position: relative; background: #0F1D28; color: #E2E8F0; padding: 12px 14px;
  border-radius: 12px; font-size: .78rem; line-height: 1.8; overflow: auto;
  direction: ltr; text-align: left; margin: 10px 0; font-family: var(--mono);
}
.guide-code code { background: none; padding: 0; color: inherit; font-size: inherit; }
.guide-card code, .assistant-block code {
  background: var(--bg-soft); padding: 1px 5px; border-radius: 6px;
  font-size: .82em; direction: ltr; unicode-bidi: embed;
}
.guide-list { margin: 8px 18px 8px 0; padding: 0; font-size: .86rem; display: grid; gap: 6px; }

.admin-chat.assistant { position: static; inset: auto; z-index: auto; display: block; width: 100%; max-width: none; }
.admin-chat .assistant-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; flex-wrap: wrap; margin-bottom: 14px;
}
.admin-chat .assistant-ident { display: flex; gap: 12px; align-items: flex-start; }
.admin-chat .assistant-ident p { max-width: 70ch; margin: 6px 0 0; }
.admin-chat .assistant-avatar {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  color: #FFFBEB; font-size: 1.15rem; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-deeper));
}
.admin-chat .assistant-head h1 { font-size: 1.25rem; margin: 0; }
.admin-chat .assistant-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-chat .assistant-state {
  font-size: .74rem; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deeper);
  border: 1px solid rgba(15, 118, 110, .2); white-space: nowrap;
}
.admin-chat.is-busy .assistant-state { background: var(--warn-soft); color: var(--warn); }
.admin-chat .assistant-panel {
  width: 100%; max-width: none; max-height: none;
  background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.admin-chat .assistant-chat {
  display: flex; flex-direction: column; gap: 16px;
  height: clamp(320px, calc(100vh - 340px), 700px); overflow-y: auto;
  padding: 18px 18px 10px; background: linear-gradient(var(--bg), #fff 60%);
}
.admin-chat .msg { display: flex; gap: 10px; max-width: 100%; padding: 0; border: 0; background: transparent; font-size: .88rem; }
.admin-chat .msg-user { flex-direction: row-reverse; }
.admin-chat .msg-avatar {
  width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center;
  font-size: .68rem; font-weight: 700; background: var(--bg-2); color: var(--ink-soft);
}
.admin-chat .msg-bot .msg-avatar { background: linear-gradient(135deg, var(--brand), var(--brand-deeper)); color: #FFFBEB; }
.admin-chat .msg-user .msg-avatar { background: var(--accent-bright); color: #fff; font-size: .62rem; }
.admin-chat .msg-main { display: flex; flex-direction: column; gap: 6px; max-width: min(780px, calc(100% - 48px)); min-width: 0; }
.admin-chat .msg-head { display: flex; gap: 8px; align-items: center; font-size: .72rem; color: var(--ink-mute); }
.admin-chat .msg-body {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; line-height: 1.95; font-size: .88rem; min-width: 0; overflow-wrap: anywhere;
}
.admin-chat .msg-user .msg-body { background: var(--brand-soft); border-color: rgba(15, 118, 110, .2); }
.admin-chat .msg-body h4 { font-size: .9rem; color: var(--brand-deeper); margin: 12px 0 4px; }
.admin-chat .msg-body h4:first-child { margin-top: 0; }
.admin-chat .msg-body table { display: block; max-width: 100%; overflow-x: auto; }
.admin-chat .assistant-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.admin-chat .assistant-composer { display: flex; gap: 10px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); background: #fff; }
.admin-chat .assistant-composer textarea {
  flex: 1; resize: none; min-height: 48px; max-height: 160px; overflow-y: auto;
  font-family: inherit; font-size: .9rem; line-height: 1.8; padding: 11px 13px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--ink);
}
.admin-chat .assistant-composer textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.admin-chat .assistant-send { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.admin-chat .assistant-hint { padding: 0 16px 14px; margin: 0; }
.code-copy {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  font: inherit; font-size: .68rem; padding: 3px 9px; border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, .35); background: rgba(15, 29, 40, .82);
  color: #E2E8F0; cursor: pointer; direction: rtl;
}
.typing { display: inline-flex; gap: 5px; padding: 6px 2px; align-items: center; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); opacity: .35; animation: assistant-typing 1.1s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes assistant-typing { 0%, 60%, 100% { transform: translateY(0); opacity: .3; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---- public assistant rich text ---- */
.msg .msg-body p { margin: 0 0 6px; white-space: pre-line; }
.msg .msg-body > :last-child { margin-bottom: 0; }
.msg .msg-body ul, .msg .msg-body ol { margin: 0 16px 6px 0; padding: 0; display: grid; gap: 4px; }
.msg .msg-body code { background: rgba(19, 32, 46, .07); padding: 1px 4px; border-radius: 5px; font-size: .88em; direction: ltr; unicode-bidi: embed; }

/* -------------------------------------------------------------- utilities */
[hidden] { display: none !important; }
.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; }
.text-balance { text-wrap: balance; }
.fade-in { animation: fadeIn .45s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .with-sidebar { grid-template-columns: 236px minmax(0, 1fr); gap: 18px; }
  .admin-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --head-h: 64px; }
  .head-inner { gap: 8px; flex-wrap: wrap; padding-block: 8px; }
  .brand { order: 1; }
  .head-actions { order: 2; gap: 6px; }
  .head-search { order: 3; flex: 1 1 100%; max-width: none; margin-block-end: 2px; }
  .nav-burger { display: inline-flex; }
  .head-nav {
    position: fixed; inset-block-start: calc(var(--head-h) + 8px); inset-inline: 12px; z-index: 70;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(255, 255, 255, .98);
    border: 1px solid var(--line); border-radius: var(--r-md);
    padding: 10px; box-shadow: var(--shadow-lg);
    display: none; max-height: calc(100vh - var(--head-h) - 24px); overflow-y: auto;
  }
  body.nav-open .head-nav { display: flex; }
  .head-nav > a, .head-nav > form > button { padding: 11px 13px; border-radius: 11px; font-size: .92rem; width: 100%; text-align: start; }
  .head-nav > form { width: 100%; }
  .nav-sep { display: none; }
  .nav-drop { width: 100%; }
  .nav-drop-btn { width: 100%; justify-content: space-between; padding: 11px 13px; font-size: .92rem; }
  .drop-panel, .drop-panel-wide {
    position: static; width: auto; max-width: none; padding: 4px 4px 8px;
    background: transparent; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none;
  }
  .nav-drop:hover .drop-panel { display: none; }
  .nav-drop[data-open="true"] .drop-panel, .nav-drop[data-open="true"]:hover .drop-panel { display: block; }
  .drop-grid, .drop-split { grid-template-columns: 1fr; gap: 2px; }
  .drop-item { padding: 9px 11px; background: var(--bg-soft); margin-bottom: 3px; }
  .drop-foot { display: none; }

  .with-sidebar, .split-2, .auth-wrap, .learn-hero { grid-template-columns: 1fr; }
  .sidebar { position: static; display: none; }
  body.filters-open .sidebar { display: block; }
  .filter-toggle { display: inline-flex; }
  .auth-aside { order: 2; padding: 22px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 22px; }

  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-side {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 80;
    width: 262px; transform: translateX(-104%); transition: transform .22s ease;
    box-shadow: var(--shadow-lg);
  }
  html[dir="rtl"] .admin-side { transform: translateX(104%); }
  body.admin-nav-open .admin-side { transform: translateX(0); }
  .admin-side-toggle { display: inline-flex; }
  .admin-content { padding: 16px 14px 40px; }
  .admin-top { padding: 10px 14px; flex-wrap: wrap; row-gap: 6px; }
  .admin-top .crumbs { flex: 1 1 auto; }
  .admin-top-actions .btn { padding: 5px 11px; font-size: .78rem; }

  main { padding-block-start: 20px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-shell { padding: 24px 18px; border-radius: var(--r-lg); }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .assistant:not(.admin-chat) { inset-block-end: 14px; inset-inline-end: 14px; }
  .assistant:not(.admin-chat) .assistant-panel { width: calc(100vw - 28px); }
  .assistant-fab span { display: none; }
  .assistant-fab { padding: 13px; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .container { padding-inline: 15px; }
  .brand-text small { display: none; }
  .hero h1 { font-size: 1.62rem; }
  .hero-search { flex-direction: column; border-radius: var(--r-md); padding: 8px; }
  .hero-search input, .hero-search .btn { border-radius: 12px; width: 100%; }
  .hero-search .btn { margin-block-start: 4px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .table-toolbar { flex-wrap: nowrap; overflow-x: auto; padding-block-end: 4px; }
  .table-toolbar .chip-row { flex-wrap: nowrap; }
  .table-toolbar .chip { flex: none; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; gap: 6px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tab { white-space: nowrap; }

  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 10px; background: #fff; padding: 6px 4px; }
  table.data td { border: 0; padding: 7px 12px; display: flex; gap: 10px; align-items: flex-start; }
  table.data td::before { content: attr(data-label); flex: none; width: 96px; font-size: .74rem; color: var(--ink-mute); font-weight: 700; }
  table.data td.actions::before { content: ""; width: 0; }
  table.data td.actions { flex-wrap: wrap; }
  .table-wrap { background: transparent; border: 0; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
@media print {
  .site-head, .site-foot, .paywall, .chip-row, .sidebar, .admin-side, .admin-top { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; }
}


/* ==========================================================================
   تکمیل نهایی محصول (Pack 4):
   ۱. ریسپانسیو کامل دستیار مدیر روی تمام صفحات (موبایل، تبلت، دسکتاپ)
   ۲. رفع باگ ناپدید شدن منوی حساب کاربری در موبایل
   ۳. باکس جست‌وجوی هوشمند (Autocomplete)، نوتیفیکیشن Toast و دکمه بازگشت به بالا
   ۴. لایه تاریک پس‌زمینه منوی موبایل ادمین و گرید واکنش‌گرا برای صفحه درخواست‌ها
   ========================================================================== */

/* ---- گرید دوتایی با سایدبار که در موبایل منظم زیر هم می‌افتد ---- */
.split-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
  align-items: start;
}
.split-aside > * { min-width: 0; }
@media (max-width: 900px) {
  .split-aside { grid-template-columns: minmax(0, 1fr); }
}

/* ---- پنل کاربری: همیشه قابل دسترس روی دسکتاپ و موبایل ---- */
.account-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.account-shell > * { min-width: 0; }
.account-side { position: sticky; top: calc(var(--head-h) + 16px); }
.account-mobile-nav { display: none; }

@media (max-width: 900px) {
  .account-shell { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .account-side { display: none; }
  .account-mobile-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .account-mobile-nav::-webkit-scrollbar { display: none; }
  .account-mobile-nav a {
    flex: none;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
    font-size: .83rem;
    font-weight: 700;
    white-space: nowrap;
  }
  .account-mobile-nav a.current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
  }
}

/* ---- پس‌زمینه تاریک و دکمه بستن منوی کشویی پنل مدیریت در موبایل ---- */
.admin-backdrop {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(14, 34, 41, .52);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
body.admin-nav-open .admin-backdrop { opacity: 1; visibility: visible; }
.admin-side-close {
  display: none;
  margin-inline-start: auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.admin-side-top { display: flex; align-items: center; gap: 8px; }
@media (max-width: 900px) {
  .admin-side-close { display: inline-flex; }
  body.admin-nav-open { overflow: hidden; }
}

/* ---- دستیار مدیر: کاملاً ریسپانسیو از ۳۲۰ پیکسل تا نمایشگرهای عریض ---- */
.admin-chat.assistant {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.admin-chat .assistant-head {
  background: linear-gradient(135deg, rgba(15, 118, 110, .08), rgba(217, 119, 6, .06)), #fff;
  border: 1px solid rgba(15, 118, 110, .16);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 14px;
  align-items: center;
}
.admin-chat .assistant-ident { min-width: 0; flex: 1 1 280px; }
.admin-chat .assistant-ident > div { min-width: 0; }
.admin-chat .assistant-ident p { font-size: .83rem; line-height: 1.75; }
.admin-chat .assistant-actions { flex-shrink: 0; }
.admin-chat .assistant-panel {
  border-color: rgba(15, 118, 110, .16);
  box-shadow: var(--shadow-md);
}
.admin-chat .assistant-chat {
  height: clamp(320px, calc(100dvh - 355px), 660px);
  min-height: 280px;
  padding: 18px;
  scroll-behavior: smooth;
}
.admin-chat .msg { width: 100%; min-width: 0; align-items: flex-start; }
.admin-chat .msg-main {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(820px, calc(100% - 44px));
}
.admin-chat .msg-user .msg-main { align-items: flex-end; }
.admin-chat .msg-user .msg-body { width: fit-content; max-width: 100%; }
.admin-chat .msg-body {
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.admin-chat .msg-body pre,
.admin-chat .guide-code {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-chat .assistant-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.admin-chat .assistant-table th,
.admin-chat .assistant-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}
.admin-chat .assistant-table th {
  color: var(--ink-mute);
  font-weight: 700;
  white-space: nowrap;
}
.admin-chat .assistant-chips {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.admin-chat .assistant-composer {
  padding: 12px 16px;
  background: #fff;
}
.admin-chat .assistant-composer textarea {
  min-width: 0;
  width: 100%;
}

@media (max-width: 900px) {
  .admin-chat .assistant-head {
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .admin-chat .assistant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }
  .admin-chat .assistant-chat {
    height: clamp(280px, 52dvh, 520px);
    padding: 14px 12px;
    gap: 12px;
  }
  .admin-chat .assistant-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 10px 12px;
  }
  .admin-chat .assistant-chips::-webkit-scrollbar { display: none; }
  .admin-chat .assistant-chips .chip { flex: none; white-space: nowrap; }
}

@media (max-width: 640px) {
  .admin-chat .assistant-avatar { width: 38px; height: 38px; font-size: 1rem; border-radius: 11px; }
  .admin-chat .assistant-ident p { font-size: .79rem; }
  .admin-chat .msg-avatar { display: none; }
  .admin-chat .msg-main { max-width: 100%; }
  .admin-chat .msg-body { padding: 11px 12px; font-size: .85rem; }
  .admin-chat .assistant-table th { white-space: normal; }
  .admin-chat .assistant-composer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }
  .admin-chat .assistant-send {
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  .admin-chat .assistant-send .btn {
    min-height: 44px;
    padding-inline: 24px;
  }
  .admin-chat .assistant-hint {
    display: none;
  }
}

/* ---- پیشنهادهای زنده جست‌وجو (Search Autocomplete) ---- */
.search-wrap { position: relative; }
.head-search, .hero-search { position: relative; }
.search-suggest-box {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline: 0;
  z-index: 95;
  background: #fff;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
}
.search-suggest-box[hidden] { display: none; }
.suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 11px;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
  border: 0;
  background: transparent;
  font-family: inherit;
  width: 100%;
  transition: background .12s ease, color .12s ease;
}
.suggest-item:hover,
.suggest-item.active {
  background: var(--brand-soft);
  color: var(--brand-deeper);
}
.suggest-item small {
  font-size: .72rem;
  color: var(--ink-mute);
  font-weight: 500;
}

/* ---- نوتیفیکیشن شناور (Toast) ---- */
.toast-stack {
  position: fixed;
  inset-block-end: 22px;
  inset-inline-start: 50%;
  transform: translateX(50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 28px);
}
html[dir="ltr"] .toast-stack { transform: translateX(-50%); }
.toast {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #0E2229;
  color: #FFFBEB;
  font-size: .84rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(253, 230, 138, .25);
  animation: toastIn .22s ease both;
}
.toast-ok { background: var(--brand-deeper); }
.toast-warn { background: #92400E; }
.toast.leaving { opacity: 0; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* ---- دکمه شناور بازگشت به بالا ---- */
.to-top {
  position: fixed;
  inset-block-end: 22px;
  inset-inline-start: 20px;
  z-index: 85;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .92);
  color: var(--brand-deeper);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background .15s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (max-width: 640px) {
  .to-top { inset-block-end: 16px; inset-inline-start: 14px; width: 38px; height: 38px; }
}


/* ==========================================================================
   بسته پنجم (Pack 5):
   ۱. قفل دقیق ارتفاع دستیار مدیر به اندازهٔ واقعی صفحه (بدون نیاز به اسکرول صفحه!)
   ۲. کارت‌های فیچر و توضیح کامل کارکرد مهارت در صفحهٔ جزئیات
   ========================================================================== */

/* ---- قفل دقیق دستیار مدیر در یک صفحه بدون اسکرول بیرونی ---- */
.admin-main:has(.admin-content-chat) {
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.admin-content-chat {
  flex: 1 1 0;
  min-height: 0;
  height: calc(100dvh - var(--admin-top-h, 62px));
  max-height: calc(100dvh - var(--admin-top-h, 62px));
  padding: 12px 18px 14px !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 100%;
}
.admin-content-chat .admin-chat.assistant {
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-content-chat .assistant-head {
  flex: none;
  margin: 0 !important;
  padding: 10px 14px !important;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.admin-content-chat .assistant-ident {
  flex: 0 1 auto;
  align-items: center;
  gap: 10px;
}
.admin-content-chat .assistant-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-content-chat .assistant-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: .95rem;
}
.admin-content-chat .assistant-head h1 {
  font-size: 1.05rem;
  margin: 0;
}
.admin-content-chat .assistant-panel {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
}
.admin-content-chat .assistant-chat {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto;
  padding: 14px 16px;
}
.admin-content-chat .assistant-chips {
  flex: none;
  display: flex;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 7px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.admin-content-chat .assistant-chips::-webkit-scrollbar { display: none; }
.admin-content-chat .assistant-chips .chip {
  flex: none;
  white-space: nowrap;
  padding: 4px 11px;
  font-size: .77rem;
}
.admin-content-chat .assistant-composer {
  flex: none;
  display: flex;
  flex-direction: row !important;
  align-items: flex-end !important;
  gap: 8px;
  padding: 10px 12px !important;
  border-top: 1px solid var(--line);
  background: #fff;
}
.admin-content-chat .assistant-composer textarea {
  flex: 1 1 auto;
  min-height: 42px;
  max-height: 110px;
  padding: 9px 12px;
  font-size: .88rem;
  line-height: 1.6;
}
.admin-content-chat .assistant-send {
  flex: none;
  width: auto !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px;
}
.admin-content-chat .assistant-send .btn {
  min-height: 42px;
  padding-inline: 18px;
}
.admin-content-chat .assistant-count:empty { display: none; }

@media (max-width: 900px) {
  .admin-content-chat {
    padding: 8px 10px 10px !important;
  }
  .admin-content-chat .assistant-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px !important;
  }
  .admin-content-chat .assistant-actions {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 6px;
  }
  .admin-content-chat .assistant-actions::-webkit-scrollbar { display: none; }
  .admin-content-chat .assistant-actions .btn {
    flex: none;
    padding: 5px 10px;
    font-size: .76rem;
  }
}

/* ---- کارت‌های توضیح فیچرها در صفحهٔ جزئیات مهارت ---- */
.orig-desc-box {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--accent-bright);
  margin-top: 10px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}
.feature-card {
  padding: 14px 15px;
  border-radius: 14px;
  background: linear-gradient(180deg, #FFFFFF, var(--bg));
  border: 1px solid var(--line);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.feature-card:hover {
  border-color: rgba(15, 118, 110, .32);
  box-shadow: var(--shadow-xs);
}
.feature-title {
  font-size: .9rem;
  font-weight: 800;
  color: var(--brand-deeper);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.feature-dot {
  color: var(--accent-bright);
  font-size: .85em;
}


/* ==========================================================================
   بسته ششم (Pack 6): استایل‌های مرکز آموزش تصویری و اسکرین‌شات‌های راهنما
   ========================================================================== */
.academy-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3.8vw, 42px);
  border-radius: var(--r-xl);
  border: 1px solid rgba(15, 118, 110, .2);
  background:
    radial-gradient(34rem 20rem at 95% 5%, rgba(15, 118, 110, .14), transparent 62%),
    radial-gradient(28rem 18rem at 5% 95%, rgba(217, 119, 6, .13), transparent 62%),
    linear-gradient(180deg, #FFFFFF, #FAF7F0);
  box-shadow: var(--shadow-md);
}
.academy-hero h1 em {
  font-style: normal;
  color: var(--brand);
  background: linear-gradient(180deg, transparent 64%, rgba(217, 119, 6, .22) 64%);
  padding-inline: 4px;
  border-radius: 4px;
}
.academy-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  gap: 24px;
  align-items: center;
}
.academy-stats {
  display: grid;
  gap: 10px;
}
.academy-stats > div {
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
}
.academy-stats strong {
  display: block;
  font-size: 1.28rem;
  color: var(--brand-deeper);
}
.academy-stats span {
  font-size: .76rem;
  color: var(--ink-mute);
}

.learn-section {
  margin-top: 40px;
  scroll-margin-top: 96px;
}

/* پنجره‌های اسکرین‌شات شبیه‌سازی‌شده (Mockup Windows) */
.mockup-win {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.mockup-win-pro {
  border-color: rgba(15, 118, 110, .35);
  box-shadow: var(--shadow-md);
}
.mockup-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.mockup-bar .dots { display: inline-flex; gap: 5px; }
.mockup-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: #E11D48; display: block; }
.mockup-bar .dots i:nth-child(2) { background: #F59E0B; }
.mockup-bar .dots i:nth-child(3) { background: #14B8A6; }
.mockup-title { font-size: .78rem; font-weight: 700; color: var(--ink-soft); margin-inline-end: auto; }
.mockup-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.mock-chat-user {
  align-self: flex-start;
  background: var(--brand-soft);
  border: 1px solid rgba(15, 118, 110, .2);
  color: var(--brand-deeper);
  padding: 9px 13px;
  border-radius: 14px 14px 4px 14px;
  font-size: .85rem;
  font-weight: 600;
}
.mock-chat-bot {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 11px 13px;
  border-radius: 14px;
  font-size: .85rem;
}
.mock-agent-steps {
  display: grid;
  gap: 7px;
  background: #0F1D28;
  color: #E2E8F0;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: .82rem;
  line-height: 1.75;
}
.mock-agent-steps code {
  background: rgba(255, 255, 255, .1);
  color: #5EEAD4;
  padding: 1px 6px;
  border-radius: 5px;
  direction: ltr;
  display: inline-block;
}
.mock-agent-steps .step-ico { margin-inline-end: 4px; }
.mockup-callout {
  margin-top: auto;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 600;
}
.mockup-callout.ok { background: var(--ok-soft); color: var(--ok); }
.mockup-callout.warn { background: var(--warn-soft); color: var(--warn); }

/* فلو ۳ مرحله‌ای نحوه کارکرد اسکیل */
.flow-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.flow-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flow-num {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deeper));
  color: #FEF3C7;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: .95rem;
}
.mini-screen {
  margin-top: auto;
  padding: 11px 12px;
  border-radius: 12px;
  background: #0F1D28;
  color: #CBD5E1;
  font-size: .76rem;
  line-height: 1.85;
  border: 1px solid rgba(253, 230, 138, .15);
}
.mini-screen span { color: #5EEAD4; font-family: var(--mono); font-weight: 700; }
.mini-pill { background: rgba(255,255,255,.08); padding: 4px 8px; border-radius: 8px; color: #F8FAFC; }
.mini-arrow { text-align: center; color: #FBBF24; font-size: .74rem; padding: 3px 0; }
.mini-match { color: #5EEAD4; font-family: var(--mono); font-size: .72rem; word-break: break-all; }
.mini-ok { color: #86EFAC; }

/* کالبدشکافی SKILL.md */
.anatomy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 0;
}
.anatomy-code {
  margin: 0;
  padding: 18px 20px;
  background: #0F1D28;
  color: #E2E8F0;
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.95;
  overflow-x: auto;
}
.anatomy-code .k { color: #FCD34D; }
.anatomy-code .s { color: #5EEAD4; }
.anatomy-code .c { color: #94A3B8; }
.anatomy-notes {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
}
.note-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
}
.note-box .badge { margin-bottom: 5px; }

/* اسکرین‌شات‌های ۳ مرحله‌ای نصب */
.walkthrough-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.walk-card {
  display: flex;
  flex-direction: column;
}
.ui-shot {
  margin-top: auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--bg);
}
.ui-shot-dark {
  background: #0F1D28;
  color: #E2E8F0;
  border-color: rgba(253, 230, 138, .18);
}
.ui-shot-bar {
  padding: 7px 12px;
  font-size: .72rem;
  font-weight: 700;
  background: rgba(15, 118, 110, .1);
  color: var(--brand-deeper);
  border-bottom: 1px solid var(--line);
}
.ui-shot-dark .ui-shot-bar {
  background: rgba(255, 255, 255, .05);
  color: #94A3B8;
  border-bottom-color: rgba(255, 255, 255, .08);
}
.ui-shot-inner { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.shot-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.shot-chip {
  font-size: .7rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-weight: 600;
}
.shot-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.shot-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.shot-btn {
  font-size: .72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-soft);
}
.shot-btn.primary { background: var(--brand); color: #fff; border-color: transparent; }
.shot-caption { font-size: .73rem; color: var(--ok); font-weight: 600; }

.folder-tree {
  padding: 12px;
  font-family: var(--mono);
  font-size: .74rem;
  line-height: 1.9;
}
.ft-row { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-row em { font-style: normal; font-family: var(--font); font-size: .72rem; color: #FCD34D; margin-left: 6px; }
.ft-i1 { padding-left: 14px; }
.ft-i2 { padding-left: 28px; }
.ft-i3 { padding-left: 42px; }
.ft-i4 { padding-left: 56px; }
.ft-hi { color: #F8FAFC; font-weight: 600; }
.ft-file { color: #5EEAD4; font-weight: 700; }
.ft-dim { color: #64748B; }

.term-shot {
  padding: 12px;
  font-family: var(--mono);
  font-size: .76rem;
  line-height: 1.9;
}
.term-cmd { color: #FCD34D; font-weight: 700; }
.term-info { color: #5EEAD4; font-size: .72rem; }
.term-out {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(21, 128, 61, .18);
  color: #BBF7D0;
  font-family: var(--font);
  font-size: .78rem;
  line-height: 1.75;
}

/* چرخه ۴ مرحله‌ای در صفحه agents-101 */
.flow-4-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}
.flow-4-inline > div {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
}
.flow-4-inline strong { display: block; color: var(--brand-deeper); font-size: .88rem; margin-bottom: 3px; }
.flow-4-inline span { font-size: .8rem; color: var(--ink-soft); line-height: 1.7; display: block; }

@media (max-width: 960px) {
  .academy-hero-grid,
  .flow-3,
  .anatomy-grid,
  .walkthrough-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* پیش‌نمایش فشردهٔ پروژه در صفحهٔ مهارت (بدون اشغال فضای زیاد) */
.skill-shot {
  margin: 14px 0 4px;
  max-width: 420px;
}
.skill-shot img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}
.skill-shot figcaption {
  margin-top: 6px;
  font-size: .74rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   قیمت‌گذاری دوگزینه‌ای + آکادمی دوره‌ای (پایتون / ایجنت‌ها)
   -------------------------------------------------------------------------- */
.plan-grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.plan.featured { position: relative; }

.amount-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.amount-chip {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm, 10px);
  background: var(--surface); color: var(--ink); font: inherit; text-align: start; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.amount-chip strong { font-size: .92rem; }
.amount-chip span { font-size: .73rem; color: var(--ink-mute); }
.amount-chip:hover { border-color: var(--brand); background: var(--brand-soft); }
.amount-chip.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 2px rgba(15,118,110,.16) inset; }
.amount-form input[type="number"] { font-variant-numeric: tabular-nums; }

.course-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .8rem; color: var(--ink-mute); margin-bottom: 14px; }
.course-breadcrumb a { color: var(--brand-dark); text-decoration: none; }
.course-breadcrumb a:hover { text-decoration: underline; }

.course-shell { display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 24px; align-items: start; }
.course-side-desktop { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; }
.course-toc { border: 1px solid var(--line); border-radius: var(--r-md, 14px); background: var(--surface); padding: 14px; }
.course-toc-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.course-toc-title { font-weight: 800; color: var(--ink); text-decoration: none; font-size: .93rem; }
.course-toc-list { list-style: none; margin: 0; padding: 0; font-size: .83rem; }
.course-chapter { margin-bottom: 10px; }
.course-chapter-name { display: block; font-size: .72rem; font-weight: 700; color: var(--ink-mute); margin: 0 0 5px; }
.course-toc-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.course-toc-list ul a { display: block; padding: 5px 8px; border-radius: 8px; color: var(--ink-soft); text-decoration: none; line-height: 1.6; }
.course-toc-list ul a:hover { background: var(--bg-soft); color: var(--brand-dark); }
.course-toc-list ul a.is-current { background: var(--brand-soft); color: var(--brand-deeper); font-weight: 700; }
.course-toc-mobile { display: none; margin-bottom: 16px; padding: 0; }
.course-toc-mobile > summary { cursor: pointer; padding: 14px 16px; font-weight: 700; }
.course-toc-mobile .course-toc { border: 0; padding: 0 16px 14px; }

.course-main { min-width: 0; }
.course-hero { margin-bottom: 18px; }
.course-hero h1 { margin: 8px 0 6px; }
.course-subtitle { color: var(--ink-soft); font-size: 1rem; margin: 0 0 6px; }
.course-hero-lesson { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.course-progress { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.course-chapter-card { margin-bottom: 14px; }
.course-lesson-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.course-lesson-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.course-lesson-list a:hover { border-color: var(--brand); background: var(--brand-soft); }

.course-body { font-size: .96rem; line-height: 2; color: var(--ink-soft); }
.course-body > p { margin: 0 0 12px; }
.course-list { margin: 0 0 14px; padding-inline-start: 20px; }
.course-list li { margin-bottom: 5px; }
.code-wrap { margin: 0 0 16px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(19,32,46,.12); }
.code-wrap-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; background: #1D2A38; color: #CBD5E1; font-size: .72rem; }
.code-wrap .code-block { margin: 0; border-radius: 0; }
.course-output { margin: 0 0 16px; border-inline-start: 3px solid var(--brand); background: var(--brand-soft); border-radius: 10px; padding: 10px 14px; }
.course-output-label { display: block; font-size: .72rem; font-weight: 700; color: var(--brand-deeper); margin-bottom: 4px; }
.course-output pre { margin: 0; font-size: .84rem; line-height: 1.85; color: var(--ink); overflow-x: auto; }
.course-note { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); border-inline-start: 3px solid var(--accent); color: #7C4A06; font-size: .9rem; line-height: 1.9; }
.course-exercise { margin: 18px 0; padding: 16px; border: 1px dashed rgba(15,118,110,.4); border-radius: 12px; background: var(--bg-soft); }

.course-pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 22px 0; }
.course-pager .btn { max-width: 100%; }
.course-related { margin-top: 20px; }
.course-card h2, .course-card h3 { margin: 6px 0 4px; }
.course-card-cta { display: inline-block; margin-top: 10px; font-weight: 700; font-size: .86rem; color: var(--brand-dark); }

@media (max-width: 900px) {
  .course-shell { grid-template-columns: 1fr; }
  .course-side-desktop { display: none; }
  .course-toc-mobile { display: block; }
}
@media (max-width: 520px) {
  .amount-choices { grid-template-columns: 1fr; }
  .course-body { font-size: .93rem; }
}

/* --------------------------------------------------------------------------
   اخبار و مقالات (/news) + صفحهٔ مطلب
   -------------------------------------------------------------------------- */
.news-hero { margin-bottom: 18px; }
.news-hero h1 { margin: 10px 0 8px; }
.news-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; }
.news-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-soft); text-decoration: none;
  font-size: .85rem; font-weight: 600; transition: all .15s ease;
}
.news-chip span { font-size: .72rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.news-chip:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.news-chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.news-chip.is-active span { color: rgba(255,255,255,.82); }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.news-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; }
.news-card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.news-card h2 { font-size: 1.02rem; line-height: 1.65; margin: 4px 0 2px; }
.news-card-summary { margin: 0; line-height: 1.85; }
.news-card-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; font-size: .74rem; color: var(--ink-mute); border-top: 1px solid var(--line); }

.news-post { max-width: 74ch; }
.news-post-head { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.news-post-head h1 { margin: 8px 0; }
.news-post-lead { font-size: 1.02rem; color: var(--ink-soft); line-height: 1.95; margin: 0 0 10px; }
.news-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: .8rem; color: var(--ink-mute); margin-bottom: 10px; }
.news-post-body { font-size: .98rem; line-height: 2; color: var(--ink-soft); }
.news-post-body h2 { margin: 24px 0 8px; font-size: 1.2rem; color: var(--ink); }
.news-post-body h3 { margin: 18px 0 6px; font-size: 1.05rem; color: var(--ink); }
.news-post-body p { margin: 0 0 12px; }
.news-post-body ul, .news-post-body ol { margin: 0 0 14px; padding-inline-start: 22px; }
.news-post-body li { margin-bottom: 5px; }
.news-post-body blockquote { margin: 0 0 14px; padding: 10px 16px; border-inline-start: 3px solid var(--accent); background: var(--accent-soft); border-radius: 10px; }
.news-post-body blockquote p { margin: 0; }
.news-post-body code { background: var(--bg-2); padding: 1px 5px; border-radius: 5px; font-size: .87em; }
.news-post-body .code-block { background: #1D2A38; color: #E2E8F0; padding: 12px 14px; border-radius: 0; overflow-x: auto; font-size: .85rem; margin: 0; }
.news-post-body .code-wrap { margin: 0 0 16px; }
.news-related { margin-top: 24px; }

@media (max-width: 560px) {
  .news-card-meta { flex-direction: column; gap: 2px; }
  .news-post-body { font-size: .94rem; }
}

/* ==========================================================================
   هدر: یک‌خطی ماندن منو در صفحات داخلی و عرض بهینهٔ لپ‌تاپ
   ========================================================================== */
.head-inner { gap: 12px; }
.head-nav { flex-wrap: nowrap; gap: 2px; }
.head-nav > a,
.head-nav > form,
.head-nav > form > button,
.nav-drop-btn {
  white-space: nowrap;
  flex-shrink: 0;
}
.head-actions { flex-shrink: 0; }
.head-search { flex: 0 1 250px; min-width: 165px; max-width: 260px; }
@media (max-width: 1180px) {
  .brand-text small { display: none; }
  .head-search { flex: 0 1 200px; max-width: 210px; min-width: 145px; }
  .head-nav > a,
  .nav-drop-btn { padding: 7px 9px; font-size: .84rem; }
}
@media (max-width: 1024px) {
  .head-inner { gap: 8px; flex-wrap: wrap; padding-block: 8px; }
  .brand { order: 1; }
  .head-actions { order: 2; gap: 6px; }
  .head-search { order: 3; flex: 1 1 100%; max-width: none; min-width: 0; margin-block-end: 2px; }
  .nav-burger { display: inline-flex; }
  .head-nav {
    position: fixed; inset-block-start: calc(var(--head-h) + 8px); inset-inline: 12px; z-index: 70;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(255, 255, 255, .98);
    border: 1px solid var(--line); border-radius: var(--r-md);
    padding: 10px; box-shadow: var(--shadow-lg);
    display: none; max-height: calc(100vh - var(--head-h) - 24px); overflow-y: auto;
  }
  body.nav-open .head-nav { display: flex; }
  .head-nav > a, .head-nav > form > button { padding: 11px 13px; border-radius: 11px; font-size: .92rem; width: 100%; text-align: start; }
  .head-nav > form { width: 100%; }
  .nav-sep { display: none; }
  .nav-drop { width: 100%; }
  .nav-drop-btn { width: 100%; justify-content: space-between; padding: 11px 13px; font-size: .92rem; }
  .drop-panel, .drop-panel-wide {
    position: static; width: auto; max-width: none; padding: 4px 4px 8px;
    background: transparent; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none;
  }
  .nav-drop:hover .drop-panel { display: none; }
  .nav-drop[data-open="true"] .drop-panel, .nav-drop[data-open="true"]:hover .drop-panel { display: block; }
  .drop-grid, .drop-split { grid-template-columns: 1fr; gap: 2px; }
  .drop-item { padding: 9px 11px; background: var(--bg-soft); margin-bottom: 3px; }
  .drop-foot { display: none; }
}

/* هاب دسترسی سریع زیر Hero صفحهٔ اصلی */
.home-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.home-hub-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  transition: transform .16s ease, border-color .16s ease, box-shadow .18s ease;
}
.home-hub-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, .38);
  box-shadow: var(--shadow-md);
}
.home-hub-card .hub-ico { font-size: 1.35rem; line-height: 1; margin-bottom: 4px; }
.home-hub-card strong { color: var(--ink); font-size: .95rem; }
.home-hub-card span { color: var(--ink-mute); font-size: .79rem; line-height: 1.7; }
.home-hub-card.hub-accent {
  border-color: rgba(217, 119, 6, .35);
  background: linear-gradient(135deg, rgba(217, 119, 6, .08), #fff);
}

/* نقشهٔ راه ۵ مرحله‌ای هوش مصنوعی */
.roadmap-list { display: grid; gap: 14px; }
.roadmap-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.roadmap-step-num {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deeper));
  color: #FEF3C7; font-weight: 800; font-size: 1.1rem;
  display: grid; place-items: center;
}
.roadmap-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.roadmap-links a {
  font-size: .77rem; font-weight: 600; padding: 4px 10px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand-deeper);
}
.roadmap-links a:hover { background: var(--brand); color: #fff; }

/* بلوک مقایسه (قبل و بعد) و جعبهٔ لینک‌های درس */
.course-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}
.course-compare-bad,
.course-compare-good {
  padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--line);
  font-size: .88rem; line-height: 1.85;
}
.course-compare-bad {
  background: linear-gradient(180deg, #FFF8F8, #fff);
  border-color: rgba(185, 28, 28, .22);
}
.course-compare-good {
  background: linear-gradient(180deg, #F3FBF8, #fff);
  border-color: rgba(15, 118, 110, .3);
}
.course-links-box {
  margin: 18px 0; padding: 16px; border-radius: 14px;
  background: var(--bg-soft); border: 1px solid rgba(15, 118, 110, .18);
}

@media (max-width: 960px) {
  .home-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roadmap-card { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .roadmap-step-num { width: 40px; height: 40px; font-size: .95rem; }
  .course-compare { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .home-hub-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   استودیو ابزارها، پک‌های آماده، ویزارد صفحه اصلی و پیشرفت آکادمی (v30)
   ========================================================================== */
.page-hero {
  margin: 26px 0 8px;
  padding: 2px 0;
}
.page-hero h1 { margin: 10px 0 8px; font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.page-hero .lead { max-width: 68ch; color: var(--ink-soft); }

.studio-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  border-radius: var(--r-md);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  width: fit-content;
  max-width: 100%;
}
.studio-tab {
  border: 0;
  background: transparent;
  padding: 9px 16px;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}
.studio-tab.active { background: #fff; color: var(--brand-dark); box-shadow: var(--shadow-xs); }
.studio-panel { margin-top: 18px; }
.studio-panel[hidden] { display: none; }

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 18px;
  align-items: start;
}
.studio-sticky { position: sticky; top: calc(var(--head-h) + 16px); }

.matcher-box {
  margin-top: 24px;
  padding: 20px 22px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(15, 118, 110, .06), rgba(217, 119, 6, .06)), #fff;
  border: 1px solid rgba(15, 118, 110, .2);
}
.matcher-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.matcher-step { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.matcher-result {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.pack-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pack-card-ico { font-size: 1.5rem; line-height: 1; }
.pack-hero { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pack-convert { background: linear-gradient(135deg, rgba(15, 118, 110, .08), rgba(217, 119, 6, .08)), #fff; border-color: rgba(15, 118, 110, .22); }

.course-progress-track { margin: 0 0 16px; display: flex; flex-direction: column; gap: 6px; }
.course-toc-list a.is-done::before { content: "✓ "; color: var(--brand); font-weight: 800; }
.course-cert-box {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 118, 110, .1), rgba(217, 119, 6, .12)), #fff;
  border: 1px solid rgba(217, 119, 6, .35);
}
.course-cert-box[hidden] { display: none; }

@media (max-width: 900px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-sticky { position: static; }
}
