@font-face { font-family: 'Vazirmatn'; src: url('../vendor/fonts/Vazirmatn-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Marcellus'; src: url('../vendor/fonts/Marcellus-Regular.woff2') format('woff2'); font-display: swap; unicode-range: U+0000-002F, U+003A-10FFFF; }

:root {
  /* Warm Iranian colours: ivory paper, saffron, pomegranate, Yazd brick and a
     deep cocoa night; Isfahan turquoise only as an accent. (The old names are
     kept so every rule below takes the new palette.) */
  --lapis: #2a1712; --lapis2: #3a2119; --lapis3: #6b3424;
  --turq: #1f8a86; --turq-l: #7cc9c3;
  --gold: #d9952b; --gold-l: #f0c77a; --gold-d: #a8701c;
  --paper: #faf5ec; --paper2: #f1e7d6; --card: #fffdf8;
  --ink: #2b1d16; --ink2: #7a6656; --line: #ebdfcb;
  --clay: #b5562d; --clay-d: #8f3f1f; --madder: #a3262a; --saffron: #d9952b; --pist: #8fa35a; --purple: #6d2e46;
  --shadow: 0 1px 2px rgba(43, 29, 22, .04), 0 8px 24px rgba(43, 29, 22, .06);
  --radius: 18px;
  --display: 'Marcellus', 'Vazirmatn', Georgia, serif;
  --body: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.6 var(--body); }
body::before { /* faint girih on the paper */
  content: ''; position: fixed; inset: 0; z-index: -1; opacity: .05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%231f1c2c' stroke-width='1.2'%3E%3Cpath d='M40 8 49 31 72 40 49 49 40 72 31 49 8 40 31 31Z'/%3E%3Cpath d='M17 17 40 26 63 17 54 40 63 63 40 54 17 63 26 40Z'/%3E%3Ccircle cx='40' cy='40' r='7'/%3E%3C/g%3E%3C/svg%3E");
}
a { color: var(--lapis3); text-decoration: none; }
a:hover { color: var(--clay-d); text-decoration: underline; }
button { font: inherit; cursor: pointer; }
[dir='rtl'] body, [dir='rtl'] { font-family: var(--body); }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 12.5px; letter-spacing: -.01em; direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--ink2); }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

/* ---------------------------------------------------------------- the gate */
.gate { position: relative; color: var(--paper); background: var(--lapis); overflow: hidden; }
.gate::before { content: ''; position: absolute; inset: 0; opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23c9a14a' stroke-width='1.4'%3E%3Cpath d='M48 6 59 37 90 48 59 59 48 90 37 59 6 48 37 37Z'/%3E%3Cpath d='M18 18 48 30 78 18 66 48 78 78 48 66 18 78 30 48Z'/%3E%3Ccircle cx='48' cy='48' r='9'/%3E%3Cpath d='M0 0 18 18M96 0 78 18M0 96 18 78M96 96 78 78'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 96px 96px; }
.gate::after { /* the tile band */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Crect width='28' height='14' fill='%231fa3a0'/%3E%3Cpath d='M14 1 17 7 14 13 11 7Z' fill='%23f5ecd8'/%3E%3Ccircle cx='0' cy='7' r='3' fill='%23c9a14a'/%3E%3Ccircle cx='28' cy='7' r='3' fill='%23c9a14a'/%3E%3C/svg%3E") repeat-x;
}
.gate-in { position: relative; max-width: 1220px; margin: 0 auto; padding: 18px 20px 44px; }
.topbar { display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--paper); }
.brand:hover { text-decoration: none; color: var(--gold-l); }
.brand svg { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.brand b { font: 26px/1 var(--display); letter-spacing: .06em; display: block; }
.brand small { display: block; font-size: 12px; color: var(--gold-l); letter-spacing: .08em; margin-top: 3px; }
.topbar .sp { flex: 1; }
.lang { display: inline-flex; background: rgba(255,255,255,.08); border: 1px solid rgba(201,161,74,.4); border-radius: 99px; padding: 2px; }
.lang button { background: none; border: 0; color: var(--paper); padding: 4px 12px; border-radius: 99px; font-size: 13px; }
.lang button.on { background: var(--gold); color: var(--lapis); font-weight: 700; }
.toplink { color: var(--gold-l); font-size: 13px; }
.toplink:hover { color: var(--paper); }
.hero { text-align: center; margin-top: 26px; }
.hero h1 { font: 38px/1.15 var(--display); margin: 0; letter-spacing: .03em; color: var(--paper); }
[dir='rtl'] .hero h1 { font-family: var(--body); font-weight: 800; letter-spacing: 0; }
.hero p { margin: 10px auto 0; max-width: 640px; color: #cfd3ea; }
.search { margin: 22px auto 0; max-width: 700px; display: flex; background: var(--card); border-radius: 99px; padding: 5px; box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 3px rgba(201,161,74,.35); position: relative; }
.search input { flex: 1; border: 0; background: none; padding: 10px 18px; font: inherit; font-size: 16px; color: var(--ink); outline: none; min-width: 0; }
.search button { border: 0; background: var(--turq); color: #fff; border-radius: 99px; padding: 0 22px; font-weight: 700; }
.search button:hover { background: #178b88; }
.suggest { position: absolute; top: calc(100% + 6px); inset-inline: 10px; background: var(--card); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.3); overflow: hidden; text-align: start; z-index: 30; color: var(--ink); }
.suggest a { display: flex; gap: 10px; align-items: center; padding: 9px 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.suggest a:hover, .suggest a.on { background: var(--paper2); text-decoration: none; }
.suggest .kind { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--clay-d); min-width: 64px; }

/* ---------------------------------------------------------------- the seals (stats) */
.seals { max-width: 1220px; margin: -26px auto 0; padding: 0 20px; display: grid; gap: 12px; grid-template-columns: repeat(6, 1fr); position: relative; z-index: 2; }
.seal { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); border: 1px solid var(--line); position: relative; overflow: hidden; }
.seal::after { content: ''; position: absolute; inset-inline-end: -16px; top: -16px; width: 64px; height: 64px; opacity: .1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath d='M0-9 2.3-5.5 6.4-6.4 5.5-2.3 9 0 5.5 2.3 6.4 6.4 2.3 5.5 0 9-2.3 5.5-6.4 6.4-5.5 2.3-9 0-5.5-2.3-6.4-6.4-2.3-5.5Z' fill='%238a6a22'/%3E%3C/svg%3E") center/contain no-repeat; }
.seal .k { font-size: 12px; color: var(--ink2); letter-spacing: .04em; }
.seal .v { font: 25px/1.2 var(--display); color: var(--lapis); margin-top: 2px; }
[dir='rtl'] .seal .v { font-family: var(--body); font-weight: 800; }
.seal .s { font-size: 12px; color: var(--ink2); }
.seal .bar { height: 5px; background: var(--paper2); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.seal .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--clay)); }
.pulse { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 0 rgba(47,191,113,.6); animation: pulse 2s infinite; margin-inline-end: 6px; vertical-align: middle; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(47,191,113,0); } 100% { box-shadow: 0 0 0 0 rgba(47,191,113,0); } }
.seal.chain { background: linear-gradient(135deg, #fdf8ea, #f1e3bd); }
.seal.chain.bad { background: #f8e1df; }
.seal.chain .v { color: var(--gold-d); }

/* ---------------------------------------------------------------- the halls */
main { max-width: 1220px; margin: 0 auto; padding: 26px 20px 60px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel > header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel > header h2 { margin: 0; font: 19px/1.2 var(--display); color: var(--lapis); letter-spacing: .03em; }
[dir='rtl'] .panel > header h2 { font-family: var(--body); font-weight: 800; letter-spacing: 0; }
.panel > header .sp { flex: 1; }
.panel .body { padding: 14px 18px; }
.live { font-size: 12px; color: #2a8a55; display: inline-flex; align-items: center; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 18px 0; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 3px 11px; font-size: 13px; color: var(--ink2); display: inline-flex; align-items: center; gap: 6px; }
.chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chip.on { background: var(--lapis); color: var(--paper); border-color: var(--lapis); }

/* a tablet in the feed */
.feed { list-style: none; margin: 0; padding: 6px 0; }
.tab { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 18px; border-bottom: 1px dashed var(--line); }
.tab:last-child { border-bottom: 0; }
.tab.new { animation: arrive .9s ease-out; }
@keyframes arrive { from { background: #fff4cf; transform: translateY(-6px); opacity: 0; } to { background: transparent; transform: none; opacity: 1; } }
.glyph { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.glyph svg { width: 22px; height: 22px; }
.tab .what { min-width: 0; }
.tab .what .line { overflow-wrap: anywhere; }
.tab .what .meta { font-size: 12px; color: var(--ink2); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1px; }
.tab .amt { text-align: end; white-space: nowrap; }
.daric { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--gold-d); }
.daric svg { width: 15px; height: 15px; }
.tabno { font-family: var(--display); color: var(--clay-d); }
.more { display: block; width: calc(100% - 36px); margin: 8px 18px 16px; border: 1px dashed var(--gold); background: none; border-radius: 10px; padding: 8px; color: var(--gold-d); }
.more:hover { background: var(--paper2); }

/* the land map */
.mapbox { position: relative; }
canvas.land { width: 100%; height: 360px; display: block; border-radius: 10px; background: #efe3c6; cursor: crosshair; }
.maptip { position: absolute; pointer-events: none; background: var(--lapis); color: var(--paper); font-size: 12px; padding: 5px 9px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -130%); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink2); margin-top: 8px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-inline-end: 4px; vertical-align: -1px; }

.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.rank li:last-child { border-bottom: 0; }
.rank .pos { font: 18px var(--display); color: var(--gold-d); width: 22px; text-align: center; }
.rank canvas { width: 40px; height: 25px; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.25); flex: none; }
.rank .sp { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- a single tablet */
.crumbs { font-size: 13px; color: var(--ink2); margin-bottom: 12px; }
.clay { position: relative; background: radial-gradient(120% 90% at 30% 20%, #e7b48f, #c98458 60%, #b26a42); color: #2c1407; border-radius: 26px 22px 30px 20px / 22px 28px 20px 30px; padding: 28px 30px; box-shadow: inset 0 2px 0 rgba(255,255,255,.35), inset 0 -8px 18px rgba(80,30,10,.35), 0 18px 40px rgba(80,40,20,.25); }
.clay::before { content: ''; position: absolute; inset: 10px; border: 1.5px dashed rgba(60,25,8,.35); border-radius: 20px 16px 24px 14px; pointer-events: none; }
.clay .no { font: 15px var(--display); letter-spacing: .14em; color: #5c2a10; }
.clay h1 { font: 28px/1.3 var(--display); margin: 6px 0 14px; color: #2c1407; }
[dir='rtl'] .clay h1 { font-family: var(--body); font-weight: 800; }
.clay .when { font-size: 13px; color: #5c2a10; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 18px 0 0; }
.facts dt { color: var(--ink2); font-size: 13px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.clay .facts dt { color: #6b3518; }
.sealrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.btn { border: 1px solid var(--lapis3); background: var(--lapis); color: var(--paper); border-radius: 10px; padding: 8px 14px; font-weight: 600; }
.btn:hover { background: var(--lapis3); }
.btn.ghost { background: none; color: var(--lapis); }
.verdict { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.verdict.ok { color: #1f7a45; } .verdict.bad { color: var(--madder); }
.pager { display: flex; justify-content: space-between; margin-top: 14px; }

.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 20px; }
.ident { display: flex; gap: 16px; align-items: center; }
.ident .avatar { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font: 28px var(--display); color: var(--paper); background: linear-gradient(135deg, var(--lapis3), var(--turq)); flex: none; }
.ident h1 { margin: 0; font: 30px/1.15 var(--display); color: var(--lapis); }
[dir='rtl'] .ident h1 { font-family: var(--body); font-weight: 800; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag { font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--paper2); color: var(--ink2); border: 1px solid var(--line); }
.tag.gold { background: #f6e6b8; color: var(--gold-d); border-color: var(--gold); }
.tag.red { background: #f8dcd8; color: var(--madder); border-color: #e4a9a2; }
.tag.turq { background: #d6f1ef; color: #136e6b; border-color: #9fd8d5; }
.flagbig { width: 160px; height: 100px; border-radius: 6px; box-shadow: 0 6px 16px rgba(0,0,0,.25); }

.verify-wrap { max-width: 760px; margin: 0 auto; }
.progress { height: 12px; background: var(--paper2); border-radius: 99px; overflow: hidden; margin: 16px 0; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--turq), var(--gold)); transition: width .2s; }
.prose p { margin: 0 0 10px; }
.empty { padding: 30px 18px; text-align: center; color: var(--ink2); }

footer.foot { text-align: center; padding: 26px 20px 40px; font-size: 13px; color: var(--ink2); }
footer.foot a { color: var(--clay-d); }

@media (max-width: 1060px) { .seals { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .cols, .grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .seals { grid-template-columns: repeat(2, 1fr); padding: 0 16px; }
  .gate-in, main { padding-left: 16px; padding-right: 16px; }
  .hero h1 { font-size: 28px; }
  .brand small { display: none; }
  .brand b { font-size: 21px; white-space: nowrap; }
  .brand svg { width: 34px; height: 34px; }
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .toplink { white-space: nowrap; font-size: 12.5px; }
  .topbar .sp { flex-basis: 100%; order: 2; height: 0; }
  .lang { margin-inline-start: auto; }
  .toplink { order: 3; }
  .tab { grid-template-columns: 36px minmax(0, 1fr); padding: 10px 14px; }
  .tab .amt { grid-column: 2; text-align: start; }
  .glyph { width: 36px; height: 36px; }
  .clay { padding: 22px 18px; }
  .clay h1 { font-size: 22px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
  .facts dd { margin-bottom: 8px; }
  canvas.land { height: 280px; }
}

/* the treasury panel */
.kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed rgba(15, 24, 64, 0.12); font-size: 14px; }
.kv-row:last-of-type { border-bottom: 0; }


/* ---------------------------------------------------------------- the warm, minimal look */
body::before { opacity: .025; }
.gate { background: var(--lapis); }
.gate::before { opacity: .07; background-size: 140px 140px; }
.gate::after { height: 4px; background: linear-gradient(90deg, var(--madder) 0 25%, var(--gold) 25% 50%, var(--turq) 50% 75%, var(--clay) 75%); }
.gate-in { padding: 14px 24px 40px; }
.brand b { letter-spacing: .04em; }
.brand small { color: var(--gold-l); opacity: .8; letter-spacing: .12em; font-size: 11px; }
.hero h1 { font-size: 40px; letter-spacing: .01em; }
.hero p { color: #e2d3c0; }
.search { box-shadow: 0 12px 30px rgba(0,0,0,.25); border: 1px solid rgba(240,199,122,.35); }
.search button { background: var(--gold); color: var(--lapis); }
.search button:hover { background: var(--gold-l); }
.lang button.on { background: var(--gold); color: var(--lapis); }
.seals { margin-top: -30px; gap: 14px; }
.seal { border: 0; box-shadow: var(--shadow); padding: 16px 18px; }
.seal::after { opacity: .06; }
.seal .v { color: var(--lapis); font-size: 27px; }
.seal .bar i { background: linear-gradient(90deg, var(--gold), var(--madder)); }
.seal.chain { background: linear-gradient(135deg, #fffaf0, #f7e6c4); }
.panel { border: 0; box-shadow: var(--shadow); }
.panel > header { border-bottom: 1px solid var(--line); padding: 16px 20px; }
.panel > header h2 { color: var(--lapis); font-size: 20px; letter-spacing: .02em; }
.chip { background: var(--card); border-color: var(--line); }
.chip.on { background: var(--lapis); border-color: var(--lapis); color: var(--gold-l); }
.tab { border-bottom: 1px solid var(--line); padding: 12px 20px; }
.glyph { border-radius: 14px; box-shadow: none; }
.more { border: 1px solid var(--line); color: var(--clay-d); }
.btn { background: var(--lapis); border-color: var(--lapis); border-radius: 12px; }
.btn:hover { background: var(--lapis3); }
.rank li, .kv-row { border-bottom: 1px solid var(--line); }
footer.foot a { color: var(--clay); }
.seal::after { display: none; }
.seal .v, .rank .pos, .tabno { font-family: var(--body); font-weight: 700; letter-spacing: -.01em; }

/* Touch targets on phones: the language switch and small links. */
@media (pointer: coarse), (max-width: 760px) {
  .lang button { min-height: 36px; min-width: 44px; padding: 6px 14px; }
  .toplink { display: inline-block; padding: 10px 4px; }
  .chip { min-height: 34px; padding: 6px 13px; }
}
