.an-page {
    --g:    var(--main-color, #f59e0b);
    --gl:   #fbbf24;
    --gg:   #fcd34d;
    --gd:   #b45309;
    --bg:   #080604;
    --sf:   #110e08;
    --sf2:  #1a1610;
    --sf3:  #231f18;
    --br:   rgba(245,158,11,.15);
    --brh:  rgba(245,158,11,.45);
    --tx:   #f2ebd9;
    --txs:  var(--main-text-color, #ccc);
    --txm:  #7a6840;
    --r:    16px;
    --ease: cubic-bezier(.4,0,.2,1);
    --font: var(--main-font-family, 'IRANSans'), sans-serif;
  
    font-family: var(--font);
    font-size:   var(--main-font-size, 15px);
    direction:   rtl;
    background:  var(--bg);
    color:       var(--tx);
    min-height:  100vh;
  }
  
  /* ── Hero ── */
  .an-hero {
    position: relative;
    overflow: hidden;
    padding: 56px 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
    border-bottom: 1px solid var(--br);
  }
  
  .an-hero-glow {
    position: absolute;
    inset: -80px;
    background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(245,158,11,.13) 0%, transparent 65%);
    pointer-events: none;
  }
  .an-hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: anOrb 9s ease-in-out infinite alternate;
  }
  .an-orb-1 { width:260px;height:260px;top:-120px;right:-80px;background:radial-gradient(circle,rgba(245,200,66,.07),transparent 70%); }
  .an-orb-2 { width:180px;height:180px;bottom:-70px;left:-50px;background:radial-gradient(circle,rgba(180,83,9,.06),transparent 70%);animation-delay:-4.5s; }
  @keyframes anOrb { from{transform:translate(0,0)} to{transform:translate(14px,-14px)} }
  
  .an-hero-inner { position:relative;z-index:1; }
  
  .an-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245,158,11,.1);
    border: 1px solid var(--br);
    border-radius: 100px;
    padding: 5px 16px;
    font-size: 11px;
    color: var(--gl);
    letter-spacing: .06em;
    margin-bottom: 14px;
  }
  .an-badge-pulse {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--g);
    box-shadow: 0 0 8px var(--g);
    animation: anPulse 2s ease-in-out infinite;
  }
  @keyframes anPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.7)} }
  
  .an-hero-title {
    font-size: clamp(26px, 8vw, 48px);
    font-weight: 800;
    margin: 0 0 10px;
    background: linear-gradient(135deg, var(--gd), var(--gg), var(--g));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
  }
  .an-hero-sub {
    font-size: 13px;
    color: var(--txs);
    line-height: 1.7;
    max-width: 380px;
    margin: 0 auto 14px;
  }
  .an-breadcrumb { font-size: 12px; color: var(--txm); }
  .an-breadcrumb a { color: var(--txm); text-decoration: none; }
  .an-breadcrumb a:hover { color: var(--g); }
  
  /* pyramid */
  .an-pyramid {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
  }
  .an-pyr-layer {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    color: rgba(245,158,11,.7);
    border: 1px solid rgba(245,158,11,.18);
  }
  .an-pyr-top  { width:80px;  height:28px; background:rgba(245,158,11,.12); }
  .an-pyr-mid  { width:130px; height:28px; background:rgba(245,158,11,.08); }
  .an-pyr-base { width:190px; height:28px; background:rgba(245,158,11,.05); }
  
  /* ── Container ── */
  .an-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 16px 60px;
  }
  
  /* ── Section ── */
  .an-section {
    padding: 44px 0;
    border-bottom: 1px solid var(--br);position: relative;
  }
  .an-section:last-of-type { border-bottom: none; }
  
  /* accent stripe per section */
  .an-s-top  { --acc: #fcd34d; }
  .an-s-mid  { --acc: #f87171; }
  .an-s-base { --acc: #a78bfa; }
  
  .an-sec-head {
    display: grid;
    grid-template-columns: 52px 1fr;
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 0;
    align-items: start;
    margin-bottom: 28px;
  }
  
  .an-sec-icon {
    grid-row: 1 / 3;
    width: 52px; height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245,158,11,.08);
    border: 1px solid var(--br);
    border-radius: 14px;
    color: var(--acc);
    flex-shrink: 0;
  }
  .an-sec-icon svg { width:22px;height:22px; }
  
  .an-sec-meta { grid-column: 2; }
  .an-sec-en {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--acc);
    display: block;
    margin-bottom: 2px;
    text-transform: uppercase;
    opacity: .8;
  }
  .an-sec-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--tx);
    margin: 0 0 4px;
    line-height: 1.3;
  }
  .an-sec-desc {
    font-size: 12px;
    color: var(--txm);
    margin: 0;
    line-height: 1.6;
  }
  .an-sec-dur {
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--txm);
    margin-top: 8px;
  }
  .an-sec-dur svg { flex-shrink:0;color:var(--acc);opacity:.7; }
  
  /* ── Tags ── */
  .an-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .an-tag-item {
    animation: anTagIn .4s var(--ease) both;
    animation-delay: calc(var(--i) * 45ms);
  }
  @keyframes anTagIn {
    from { opacity:0; transform:translateY(6px); }
    to   { opacity:1; transform:translateY(0); }
  }
  
  .an-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px 9px 10px;
    background: var(--sf2);
    border: 1px solid var(--br);
    border-radius: 100px;
    text-decoration: none;
    color: var(--txs);
    font-size: 13px;
    font-weight: 500;
    transition: all .22s var(--ease);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
  }
  .an-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(245,158,11,.1), transparent);
    opacity: 0;
    transition: opacity .22s;
  }
  .an-tag:hover::before,
  .an-tag:focus-visible::before { opacity: 1; }
  
  .an-tag:hover,
  .an-tag:focus-visible {
    border-color: var(--brh);
    color: var(--tx);
    transform: translateY(-2px);box-shadow: 0 4px 14px rgba(245,158,11,.12);
    outline: none;
  }
  
  .an-tag-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--acc);
    opacity: .6;
    flex-shrink: 0;transition: opacity .2s, box-shadow .2s;
  }
  .an-tag:hover .an-tag-dot,
  .an-tag:focus-visible .an-tag-dot {
    opacity: 1;
    box-shadow: 0 0 7px var(--acc);
  }
  
  .an-tag-name { line-height: 1; }
  
  .an-tag-count {
    font-size: 10px;
    font-weight: 700;
    color: var(--g);
    background: rgba(245,158,11,.12);
    border-radius: 100px;
    padding: 1px 6px;
    line-height: 1.5;
    min-width: 20px;
    text-align: center;
  }
  
  .an-tag-arrow {
    color: var(--txm);
    display: flex;
    align-items: center;
    transition: transform .2s, color .2s;
    opacity: 0;
  }
  .an-tag:hover .an-tag-arrow,
  .an-tag:focus-visible .an-tag-arrow {
    opacity: 1;
    transform: translateX(-3px);
    color: var(--g);
  }
  
  /* ── Section accents ── */
  .an-s-top  .an-tag:hover { box-shadow:0 4px 16px rgba(252,211,77,.15); }
  .an-s-mid  .an-tag:hover { box-shadow:0 4px 16px rgba(248,113,113,.12); }
  .an-s-base .an-tag:hover { box-shadow:0 4px 16px rgba(167,139,250,.12); }
  
  /* ── Content box ── */
  .an-content-box {
    margin-top: 48px;
    padding: 28px 20px;
    background: var(--sf);
    border: 1px solid var(--br);
    border-radius: var(--r);
    color: var(--txs);
    font-size: 14px;
    line-height: 1.85;
  }
  
  /* ── Desktop ── */
  @media (min-width: 640px) {
    .an-hero { padding: 80px 40px 56px; }
    .an-hero-title { font-size: clamp(32px, 5vw, 52px); }
  
    .an-sec-head {
      grid-template-columns: 60px 1fr auto;
      grid-template-rows: auto;
      align-items: center;
    }
    .an-sec-icon { width:60px;height:60px;border-radius:18px; }
    .an-sec-icon svg { width:26px;height:26px; }
    .an-sec-meta { grid-column:2; }
    .an-sec-dur {
      grid-column: 3;
      grid-row: 1;
      align-self: center;
      margin-top: 0;
      padding: 8px 14px;
      background: rgba(245,158,11,.06);
      border: 1px solid var(--br);
      border-radius: 100px;
      white-space: nowrap;
    }
  
    .an-tag { padding: 10px 16px 10px 12px; font-size: 14px; }
  }
  
  @media (min-width: 900px) {
    .an-hero { flex-direction: row; text-align: right; align-items: center; padding: 80px 56px; }
    .an-hero-inner { text-align: right; flex: 1; }
    .an-hero-sub { margin-right: 0; margin-left: auto; }
    .an-pyramid { margin-top: 0; flex-shrink: 0; }
  }
  
  /* ══════════════════════════════════════ALL NOTES PAGE — Light Theme
     ══════════════════════════════════════ */
  
     [data-theme="light"] .an-page {
    --bg:  #fdf8f0;
    --sf:  #fff8ec;
    --sf2: #fef3d8;
    --sf3: #fde8b8;
    --br:  rgba(180,120,20,.15);
    --brh: rgba(180,120,20,.5);
    --tx:  #1a1208;
    --txs: #4a3a1a;
    --txm: #9a7c40;
  }
  
  [data-theme="light"] .an-hero {
    border-bottom-color: rgba(180,120,20,.15);
  }
  
  [data-theme="light"] .an-hero-glow {
    background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(245,158,11,.1) 0%, transparent 65%);
  }
  
  [data-theme="light"] .an-hero-badge {
    background: rgba(180,120,20,.08);
    color: #8a6010;
  }
  
  [data-theme="light"] .an-pyr-layer {
    color: rgba(140,90,10,.75);
    border-color: rgba(180,120,20,.2);
  }
  [data-theme="light"] .an-pyr-top  { background: rgba(180,120,20,.1); }
  [data-theme="light"] .an-pyr-mid  { background: rgba(180,120,20,.07); }
  [data-theme="light"] .an-pyr-base { background: rgba(180,120,20,.04); }
  
  [data-theme="light"] .an-sec-icon {
    background: rgba(180,120,20,.08);
    border-color: rgba(180,120,20,.18);
  }
  
  [data-theme="light"] .an-tag {
    background: #fff8ec;
    border-color: rgba(180,120,20,.18);
    color: #4a3a1a;
  }
  [data-theme="light"] .an-tag:hover,
  [data-theme="light"] .an-tag:focus-visible {
    color: #1a1208;
    border-color: rgba(180,120,20,.5);
    box-shadow: 0 4px 14px rgba(180,120,20,.12);
  }
  
  [data-theme="light"] .an-tag-count {
    background: rgba(180,120,20,.1);
    color: #8a6010;
  }
  
  [data-theme="light"] .an-sec-dur {
    background: rgba(180,120,20,.06);
    border-color: rgba(180,120,20,.15);
  }
  
  [data-theme="light"] .an-content-box {
    background: #fff8ec;
    border-color: rgba(180,120,20,.15);
  }
  
  /* section accent shadows */
  [data-theme="light"] .an-s-top  .an-tag:hover { box-shadow: 0 4px 16px rgba(180,130,20,.15); }
  [data-theme="light"] .an-s-mid  .an-tag:hover { box-shadow: 0 4px 16px rgba(220,80,80,.1); }
  [data-theme="light"] .an-s-base .an-tag:hover { box-shadow: 0 4px 16px rgba(140,100,220,.1); }