/* پایهٔ مشترک — سبز کله‌غازی، سفید سرد و برنجی ملایم */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2-variations"), url("../fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ink: #0b3b35;        /* سبز کله‌غازی تیره */
  --ink-2: #0f4d45;
  --green: #14675c;      /* سبز اصلی */
  --green-d: #0d524a;
  --green-l: #e6efed;
  --brass: #a88442;      /* برنج مات */
  --brass-d: #7c6029;
  --brass-l: #f1eadb;
  --ground: #f3f6f5;
  --paper: #ffffff;
  --text: #14211f;
  --muted: #5b6d6a;
  --line: #d6dfdd;
  --line-2: #b8c6c3;
  --ok: #1f7a52;
  --ok-l: #e3f1ea;
  --bad: #a3321f;
  --bad-l: #f9e8e4;
  --r: 3px;
  --font: "Vazirmatn", Tahoma, "Segoe UI", "Noto Naskh Arabic", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); line-height: 1.95; font-size: 16px; background: var(--ground); }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.5; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: var(--green); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: -60px; inset-inline-start: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 99; }
.skip:focus { top: 8px; }

/* فرم */
.fld { display: block; margin: 0 0 18px; }
.fld > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
.fld small { font-weight: 400; color: var(--muted); margin-inline-start: 6px; }
input[type=text], input[type=search], input[type=tel], input[type=password], input[type=number], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 14px; min-height: 46px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.85; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(20, 103, 92, .15); }
.fld.bad input, .fld.bad select, .fld.bad textarea { border-color: var(--bad); }
.f-err { display: block; color: var(--bad); font-size: .85rem; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: center; margin: 8px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--green); flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
@media (max-width: 640px) { .row2, .row3 { grid-template-columns: 1fr; } }

/* دکمه */
.btn, .btn-go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  min-height: 44px; padding: 8px 22px; border-radius: var(--r); border: 1px solid var(--green); background: var(--green); color: #fff; transition: background .15s, color .15s; }
.btn:hover, .btn-go:hover { background: var(--ink); border-color: var(--ink); }
.btn.ghost { background: transparent; color: var(--green); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--green-l); border-color: var(--green); }
.btn.danger { background: transparent; color: var(--bad); border-color: #d9b3ab; }
.btn.danger:hover { background: var(--bad-l); border-color: var(--bad); }
.btn.big, .btn-go { min-height: 54px; font-size: 1.05rem; width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link-btn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; text-decoration: underline; opacity: .8; }

/* پیام‌ها */
.alert { padding: 12px 16px; border-radius: var(--r); margin: 0 0 16px; border: 1px solid transparent; border-inline-start-width: 3px; }
.alert-ok { background: var(--ok-l); color: #134d33; border-color: #bcdccb; border-inline-start-color: var(--ok); }
.alert-err { background: var(--bad-l); color: #6f1f12; border-color: #ecc5bd; border-inline-start-color: var(--bad); }
.alert-warn { background: var(--brass-l); color: #5e4817; border-color: #e0d3b3; border-inline-start-color: var(--brass); }
.muted { color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); text-align: center; padding: 24px 12px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
input[type=file] { width: 100%; font: inherit; padding: 8px; border: 1px dashed var(--line-2); border-radius: var(--r); background: #fafcfb; }

/* ===== پرداخت نهایی: سبک‌تر، ظریف‌تر ===== */
body { line-height: 1.75; font-size: 15.5px; font-weight: 400; letter-spacing: 0; }
h1, h2, h3 { font-weight: 600; }
.fld { margin-bottom: 16px; }
.fld > span { font-weight: 500; font-size: .88rem; color: var(--text); }
input[type=text], input[type=search], input[type=tel], input[type=password], input[type=number], input:not([type]), select, textarea {
  min-height: 44px; padding: 8px 12px; font-size: .96rem; border-color: #c9d6d3; }
.btn, .btn-go { font-weight: 600; font-size: .94rem; min-height: 42px; padding: 7px 20px; }
.btn.big, .btn-go { min-height: 50px; font-size: 1rem; }
.alert { padding: 10px 14px; font-size: .92rem; }

/* ===== موبایل‌محور ===== */
html { scroll-padding-top: 12px; }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); overflow-wrap: break-word; }
button, a, label, select, input { -webkit-tap-highlight-color: rgba(20, 103, 92, .12); }
@media (max-width: 820px), (pointer: coarse) {
  /* ۱۶ پیکسل: مرورگر iOS هنگام فوکوس بزرگ‌نمایی نکند */
  input, select, textarea, input[type=text], input[type=search], input[type=tel], input[type=password], input[type=number], input:not([type]) { font-size: 16px; min-height: 48px; }
  .btn, .btn-go { min-height: 48px; }
  .check { min-height: 44px; }
  .check input { width: 22px; height: 22px; }
}
