 :root{
    --paper: #FAF7F0;
    --paperline: #E4DDC9;
    --ink: #16233B;
  }
  *{ font-family: 'Vazirmatn', sans-serif; }
  html{ scroll-behavior: smooth; }
  body{ background: var(--paper); color:#1C1B19; }

  .num{ font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

  /* Ledger ruled paper texture */
  .ledger-bg{
    background-image: repeating-linear-gradient(to bottom, transparent, transparent 43px, var(--paperline) 43px, var(--paperline) 44px);
  }
  .ledger-bg-dark{
    background-image: repeating-linear-gradient(to bottom, transparent, transparent 43px, rgba(190,154,93,0.12) 43px, rgba(190,154,93,0.12) 44px);
  }
  /* Margin rule like traditional accounting paper */
  .margin-rule{ position:absolute; top:0; bottom:0; right:64px; width:1px; background:rgba(162,74,66,0.28); pointer-events:none; }
  @media (max-width:1024px){ .margin-rule{ display:none; } }

  .paper-card{
    background: #FFFDF8;
    border:1px solid var(--paperline);
    box-shadow: 0 1px 0 rgba(22,35,59,0.02);
  }

  .stamp{
    animation: stampIn 900ms cubic-bezier(.2,1.4,.4,1) both;
    animation-delay: .4s;
  }
  @keyframes stampIn{
    0%{ opacity:0; transform: rotate(-18deg) scale(1.5); }
    60%{ opacity:1; }
    100%{ opacity:1; transform: rotate(-8deg) scale(1); }
  }

  .reveal{ opacity:0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.in{ opacity:1; transform: translateY(0); }

  .row-in{ opacity:0; transform: translateX(10px); animation: rowIn .5s ease forwards; }
  [dir="rtl"] .row-in{ transform: translateX(-10px); }
  @keyframes rowIn{ to{ opacity:1; transform: translateX(0); } }

  .tab-active{ background:var(--ink); color:#FAF7F0; }

  .stitch{
    background-image: radial-gradient(circle, rgba(190,154,93,0.5) 1px, transparent 1.4px);
    background-size: 10px 10px;
  }

  .brass-corner{ position:relative; }
  .brass-corner::before, .brass-corner::after{
    content:''; position:absolute; width:14px; height:14px; border-color: var(--brass,#BE9A5D);
  }
  .brass-corner::before{ top:-1px; right:-1px; border-top:2px solid #BE9A5D; border-right:2px solid #BE9A5D; }
  .brass-corner::after{ bottom:-1px; left:-1px; border-bottom:2px solid #BE9A5D; border-left:2px solid #BE9A5D; }

  ::selection{ background:#BE9A5D; color:#16233B; }

  .accordion-content{ max-height:0; overflow:hidden; transition: max-height .35s ease; }

  input:focus, button:focus, a:focus{ outline: 2px solid #BE9A5D; outline-offset:2px; }
  @media (prefers-reduced-motion: reduce){
    *{ animation:none !important; transition:none !important; }
  }