
img{max-width:100%}[hidden]{display:none!important}body{margin:0}
/* Layout: «پرونده» — the page reads like a well-kept case file: an ink hero, tabbed section labels, and a working case-finder at the centre. */
/* Vazirmatn is loaded from Google Fonts until its local WOFF2 asset is supplied. */
/* palette: deep wine (old leather law-book spines in the portrait) + matte gold */
:root {
  --paper: #F5F0EA;
  --surface: #FCF9F5;
  --ink: #1F1214;
  --muted: #6A5A55;
  --line: #E2D5CB;
  --brass: #86642A;
  --brass-soft: #EFE3CB;
  --wine: #6E1A28;
  --wine-fg: #FCF4EC;
  --navy: #7A2333;
  /* hero band stays deep wine in both themes, on purpose */
  --night: #2A0B13;
  --night-2: #3A111C;
  --night-line: #4E2230;
  --night-fg: #F4EADF;
  --night-fg-2: #E2CFC4;
  --night-muted: #C4A79E;
  --gold: #C9A562;
  --gold-hover: #D6B675;
  --on-gold: #2A0B13;
  --f-display: "Markazi Text", "Vazirmatn", "Tahoma", serif;
  --f-body: "Vazirmatn", "Tahoma", "Segoe UI", sans-serif;
  --step--1: .875rem; --step-0: 1rem; --step-1: 1.2rem; --step-2: 1.6rem; --step-3: 2.3rem; --step-4: clamp(2.8rem, 7vw, 5.2rem);
  --radius: 6px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #140D0F; --surface: #1D1416; --ink: #F1E6DC; --muted: #B3A29B; --line: #3A282B;
  --brass: #C9A562; --brass-soft: #2E2418; --wine: #8E2E3D; --wine-fg: #FCF4EC; --navy: #E3A6AF; color-scheme: dark } }
:root[data-theme="dark"] {
  --paper: #140D0F; --surface: #1D1416; --ink: #F1E6DC; --muted: #B3A29B; --line: #3A282B;
  --brass: #C9A562; --brass-soft: #2E2418; --wine: #8E2E3D; --wine-fg: #FCF4EC; --navy: #E3A6AF; color-scheme: dark }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: var(--step-0); line-height: 1.85; direction: rtl; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--night); }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.25; text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1120px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }

/* ---------- header ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--night) 92%, transparent); backdrop-filter: blur(8px); color: var(--night-fg); border-bottom: 1px solid var(--night-line); }
.top .wrap { display: flex; align-items: center; gap: 24px; padding-block: 12px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.3; }
.brand b { font-family: var(--f-display); font-size: 1.55rem; font-weight: 700; }
.brand small { color: var(--night-muted); font-size: .78rem; letter-spacing: .02em; }
.nav { display: flex; gap: 22px; margin-inline-start: auto; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--night-muted); transition: color .2s; }
.nav a:hover { color: var(--gold); }
.call { display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: var(--on-gold); text-decoration: none; font-weight: 700; padding: 9px 16px; border-radius: var(--radius); font-size: .95rem; white-space: nowrap; }
.call:hover { background: var(--gold-hover); }
.call svg { width: 17px; height: 17px; }
@media (max-width: 820px) { .nav { display: none; } .top .call { margin-inline-start: auto; } }

/* ---------- hero ---------- */
.hero { background: var(--night); color: var(--night-fg); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 15% 30%, rgba(201,165,98,.12), transparent 70%), radial-gradient(70% 90% at 90% 110%, rgba(120,20,40,.45), transparent 70%); pointer-events: none; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding-block: 64px 72px; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--gold); font-size: .9rem; letter-spacing: .04em; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hero h1 { font-size: var(--step-4); font-weight: 700; margin-top: 14px; letter-spacing: -.01em; }
.hero h1 span { display: block; font-size: .42em; font-weight: 500; color: var(--night-muted); margin-top: 6px; }
.thesis { font-size: var(--step-1); color: var(--night-fg-2); max-width: 34ch; margin-top: 22px; line-height: 1.9; }
.thesis em { font-style: normal; color: var(--gold); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: var(--radius); font-weight: 700; text-decoration: none; font-family: var(--f-body); font-size: 1rem; cursor: pointer; border: 1px solid transparent; transition: background .2s, border-color .2s, color .2s; }
.btn svg { width: 18px; height: 18px; }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: var(--gold-hover); }
.btn-ghost { border-color: var(--night-line); color: var(--night-fg); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; margin-top: 44px; border-top: 1px solid var(--night-line); padding-top: 22px; }
.fact { padding-inline: 0 28px; margin-inline-end: 28px; border-inline-end: 1px solid var(--night-line); }
.fact:last-child { border: 0; margin: 0; padding: 0; }
.fact b { display: block; font-family: var(--f-display); font-size: 2.3rem; line-height: 1.1; color: var(--night-fg); font-weight: 600; }
.fact small { color: var(--night-muted); font-size: .85rem; }

.portrait { position: relative; justify-self: center; width: min(420px, 100%); }
.portrait .frame { aspect-ratio: 3 / 4; max-width: 100%; border-radius: 3px; overflow: hidden; position: relative; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); }
.portrait .frame::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(201,165,98,.4); pointer-events: none; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; display: block; }
.seal { position: absolute; width: 132px; height: 132px; top: -34px; inset-inline-end: -34px; }
.seal svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 10px 20px rgba(0,0,0,.5)); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; padding-block: 36px 64px; }
  .portrait { order: -1; width: min(340px, 86%); }
  .seal { width: 96px; height: 96px; top: -22px; inset-inline-end: -22px; }
  .thesis { font-size: 1.08rem; }
}
@media (max-width: 440px) {
  .fact { padding-inline-end: 14px; margin-inline-end: 14px; }
  .fact b { font-size: 1.8rem; }
  .cta-row .btn { flex: 1 1 100%; }
}

/* ---------- sections ---------- */
section.block { padding-block: 84px 0; }
.tab { display: inline-flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--navy); letter-spacing: .05em; border: 1px solid var(--line); border-bottom: 0; background: var(--surface); padding: 5px 14px 4px; border-radius: 6px 6px 0 0; }
.tab b { font-variant-numeric: tabular-nums; font-weight: 700; }
.sec-head { border-top: 1px solid var(--line); padding-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: end; }
.sec-head h2 { font-size: var(--step-3); }
.sec-head p { color: var(--muted); max-width: 52ch; }
@media (max-width: 760px) { .sec-head { grid-template-columns: 1fr; } section.block { padding-block: 64px 0; } }

/* specialties */
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 36px; }
.spec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 30px 28px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cert { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700; color: var(--brass); background: var(--brass-soft); padding: 4px 11px; border-radius: 99px; }
.cert svg { width: 14px; height: 14px; }
.spec h3 { font-size: var(--step-2); }
.spec p { color: var(--muted); }
.spec ul { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.spec li { font-size: .88rem; border: 1px solid var(--line); padding: 3px 12px; border-radius: 99px; }
.others { margin-top: 20px; display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.other { padding: 20px 20px 22px; border-inline-start: 1px solid var(--line); min-width: 0; }
.other:first-child { border-inline-start: 0; }
.other h4 { margin: 0 0 4px; font-size: 1.02rem; font-weight: 700; }
.other p { font-size: .86rem; color: var(--muted); line-height: 1.75; }
@media (max-width: 960px) { .others { grid-template-columns: 1fr 1fr; } .other { border-inline-start: 0; border-top: 1px solid var(--line); } .other:nth-child(-n+2) { border-top: 0; } .other:nth-child(even) { border-inline-start: 1px solid var(--line); } .other:last-child { grid-column: 1 / -1; border-inline-start: 0; } }
@media (max-width: 700px) { .spec-grid { grid-template-columns: 1fr; } .spec { padding: 24px 20px; } }
@media (max-width: 460px) { .others { grid-template-columns: 1fr; } .other, .other:nth-child(even) { border-inline-start: 0; } .other:nth-child(2) { border-top: 1px solid var(--line); } }

/* ---------- case finder ---------- */
.finder { margin-top: 36px; display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.topics { display: flex; flex-direction: column; gap: 18px; }
.topics h3 { font-family: var(--f-body); font-size: .8rem; font-weight: 700; color: var(--muted); letter-spacing: .06em; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--f-body); font-size: .92rem; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.chip:hover { border-color: var(--wine); }
.chip[aria-pressed="true"] { background: var(--wine); color: var(--wine-fg); border-color: var(--wine); }

.folder { position: relative; min-width: 0; }
.folder-tab { display: inline-flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; padding: 7px 18px 6px; font-size: .82rem; color: var(--muted); position: relative; z-index: 1; margin-bottom: -1px; }
.folder-tab b { color: var(--navy); font-variant-numeric: tabular-nums; }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) var(--radius); padding: 30px; box-shadow: 6px 6px 0 -1px var(--paper), 6px 6px 0 0 var(--line); }
.sheet-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: baseline; border-bottom: 1px dashed var(--line); padding-bottom: 16px; }
.sheet-head h3 { font-size: var(--step-2); }
.sheet-head .area { font-size: .85rem; color: var(--navy); font-weight: 700; }
.sheet .lead { color: var(--muted); margin-top: 14px; max-width: 60ch; }
.docs-title { margin-top: 22px; font-weight: 700; font-size: .95rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.docs-title span { font-weight: 400; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.docs { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 2px; }
.docs label { display: flex; gap: 12px; align-items: flex-start; padding: 9px 4px; cursor: pointer; border-radius: 4px; line-height: 1.7; }
.docs label:hover { background: var(--paper); }
.docs input { appearance: none; flex: none; width: 19px; height: 19px; margin-top: 4px; border: 1.5px solid var(--muted); border-radius: 4px; display: grid; place-items: center; cursor: pointer; background: transparent; }
.docs input:checked { background: var(--wine); border-color: var(--wine); }
.docs input:checked::after { content: ""; width: 5px; height: 9px; border: solid var(--surface); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px,-1px); }
.docs input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--wine); }
.msg { margin-top: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.msg small { color: var(--muted); font-size: .8rem; display: block; margin-bottom: 4px; }
.msg p { font-size: .95rem; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn-ink { background: var(--wine); color: var(--wine-fg); }
.btn-ink:hover { opacity: .88; }
.btn-line { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--brass); color: var(--brass); }
.note { margin-top: 16px; font-size: .8rem; color: var(--muted); }
.toast { font-size: .85rem; color: var(--brass); font-weight: 700; align-self: center; }
@media (max-width: 900px) { .finder { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .sheet { padding: 22px 16px; box-shadow: none; } .sheet-actions .btn { flex: 1 1 100%; } }
.sheet.flip { animation: flip .35s ease; }
@keyframes flip { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; margin-top: 36px; align-items: start; }
.about blockquote { margin: 0; font-family: var(--f-display); font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.45; font-weight: 500; color: var(--ink); }
.about blockquote::before { content: "«"; color: var(--navy); }
.about blockquote::after { content: "»"; color: var(--navy); }
.about .text { display: flex; flex-direction: column; gap: 16px; color: var(--muted); }
.creds { display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 18px; font-size: .93rem; }
.creds dt { color: var(--muted); }
.creds dd { margin: 0; color: var(--ink); font-weight: 500; }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- contact ---------- */
.contact { margin-top: 36px; display: grid; grid-template-columns: 1.1fr .9fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.c-main { padding: 34px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.c-row small { display: block; color: var(--muted); font-size: .82rem; margin-bottom: 2px; }
.c-row .big { font-family: var(--f-display); font-size: 2rem; font-weight: 600; letter-spacing: .02em; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.c-row address { font-style: normal; font-size: 1.05rem; line-height: 1.9; }
.c-side { background: var(--night); color: var(--night-fg); padding: 34px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.c-side h3 { font-size: 1.7rem; }
.c-side p { color: var(--night-muted); font-size: .93rem; }
.c-side .btn { justify-content: center; }
@media (max-width: 800px) { .contact { grid-template-columns: 1fr; } .c-main, .c-side { padding: 24px 18px; } .c-row .big { font-size: 1.7rem; } }

footer { margin-top: 84px; background: var(--night); color: var(--night-muted); font-size: .85rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; padding-block: 26px calc(26px + 64px); }
@media (min-width: 821px) { footer .wrap { padding-block: 26px; } }

/* mobile action bar */
.dock { display: none; }
@media (max-width: 820px) {
  .dock { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; position: fixed; inset: auto 0 0; z-index: 30; background: var(--night); border-top: 1px solid var(--night-line); padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
  .dock a, .dock button { display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--f-body); font-size: .9rem; font-weight: 700; padding: 11px 6px; border-radius: var(--radius); text-decoration: none; border: 1px solid var(--night-line); color: var(--night-fg); background: transparent; cursor: pointer; }
  .dock a.primary { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
  .dock svg { width: 17px; height: 17px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* Polished editorial refresh — keeps the established wine / brass identity */
:root { --paper:#F7F3ED; --surface:#FFFCF8; --line:#E7DCD2; --radius:12px; }
.wrap { max-width:1190px; padding-inline:max(20px,env(safe-area-inset-left,0px)); }
.top .wrap { padding-block:14px; }
.top { box-shadow:0 10px 36px rgba(23,4,10,.10); }
.brand b { font-size:1.75rem; }
.hero .wrap { padding-block:84px 94px; }
.hero::before { content:"";pointer-events:none;position:absolute;inset:0;opacity:.23;background-image:repeating-linear-gradient(115deg,transparent,transparent 84px,rgba(201,165,98,.12) 85px,transparent 86px); }
.hero h1 { line-height:1.12; }
.hero h1 span { line-height:1.75; }
.portrait .frame { border-radius:160px 160px 12px 12px; border:1px solid rgba(201,165,98,.38); }
.portrait .frame::after { border-radius:150px 150px 6px 6px; }
.portrait { filter:drop-shadow(0 14px 28px rgba(0,0,0,.14)); }
.btn,.call { border-radius:9px; min-height:44px; }
.spec { border-radius:16px; box-shadow:0 13px 35px rgba(69,36,27,.035); transition:transform .22s ease,box-shadow .22s ease; }
.spec:hover { transform:translateY(-3px);box-shadow:0 16px 42px rgba(69,36,27,.09); }
.others,.contact { border-radius:16px; }
.sheet { border-radius:0 14px 14px 14px; }
.trust-strip { background:var(--strip-bg); color:var(--strip-fg); border-bottom:1px solid var(--strip-line); }
.trust-inner { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 24px;padding-block:15px;font-size:.91rem; }
.trust-inner b { color:var(--strip-accent); }
section.block { scroll-margin-top:88px; }
#finder .sheet { scroll-margin-top:100px; }
.note { padding:12px 14px;border-right:3px solid var(--gold);background:var(--paper);border-radius:6px; }
@media(max-width:860px){.hero .wrap{padding-block:42px 68px;gap:38px}.portrait{width:min(320px,78%)}.trust-inner{justify-content:center;text-align:center}}
@media(max-width:520px){.hero h1{font-size:clamp(2.9rem,11vw,4rem)}.trust-inner{flex-direction:column;gap:5px}.hero .wrap{padding-bottom:52px}.facts{margin-top:32px}.spec:hover{transform:none}}
@media(prefers-reduced-motion:reduce){.spec{transition:none}}

.portrait{margin:0}.c-row .big{text-decoration:none}.compact-actions{margin-top:0}

/* V5: consultation and visiting details */
.consult-info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0 22px}
.consult-info .consult-item{padding:17px 18px;border:1px solid rgba(201,165,98,.4);border-radius:14px;background:rgba(201,165,98,.07)}
.consult-info strong{display:block;font-size:1rem;margin-bottom:8px}
.consult-info p{margin:0;line-height:2;font-size:.94rem}
.consult-note{font-size:.9rem;line-height:2;opacity:.9}
.social-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.social-actions .btn{min-width:0}
@media(max-width:640px){.consult-info{grid-template-columns:1fr}.social-actions .btn{flex:1 1 140px;text-align:center}}

/* V9: theme-aware trust strip, single mobile bottom spacing, tidy contact actions */
:root { --strip-bg:#EDE4D9; --strip-fg:#50343A; --strip-line:#DED0C2; --strip-accent:#6E1A28; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --strip-bg:#1F1517; --strip-fg:#C9B5AD; --strip-line:#3A282B; --strip-accent:#C9A562; } }
:root[data-theme="dark"] { --strip-bg:#1F1517; --strip-fg:#C9B5AD; --strip-line:#3A282B; --strip-accent:#C9A562; }
@media (max-width: 820px) { footer .wrap { padding-block: 26px calc(26px + 72px + env(safe-area-inset-bottom, 0px)); } }
.social-actions { margin-top: 0; }
@media (max-width: 640px) { .social-actions .btn { flex: 1 1 100%; } }
