/* ===== ماشین‌حساب دیه (طرح «Die») =====
   روی home.css سوار است (رنگ‌ها، هدر، فوتر)؛ فقط بخش‌های خاص این صفحه اینجاست.
   ساختارش هم‌الگوی mehrie.css است (پیشوند dc- به‌جای mh-).
   منطق محاسبه در die.js است (کپی web-app/src/lib/calculators/die.ts). */

.blob1 { top: -260px; right: -160px; height: 640px; width: 640px; background: radial-gradient(closest-side, rgba(48,111,87,.14), rgba(48,111,87,0)); }
.blob2 { top: 40px; left: -220px; height: 560px; width: 560px; background: radial-gradient(closest-side, rgba(0,167,157,.09), rgba(0,167,157,0)); }

/* ---------- هیرو ---------- */
.dc-hero { position: relative; margin: 0 auto; max-width: 1100px; padding: 48px 24px 36px; text-align: center; }
.crumbs { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--faint); }
.crumbs a { padding: 8px 4px; color: var(--soft); }
.crumbs a:hover { color: var(--gd); }
.crumbs .cur { color: var(--sub); }
.dc-kick { margin-top: 18px; }
.dc-hero h1 { margin: 14px 0 0; font-size: clamp(30px, 4.6vw, 52px); font-weight: 900; line-height: 1.35; letter-spacing: -.02em; color: var(--ink); }
.dc-hero > p { margin: 16px auto 0; max-width: 42rem; font-size: clamp(15.5px, 1.5vw, 17px); line-height: 2.05; color: var(--muted); text-wrap: balance; }
.dc-stats { margin: 26px auto 0; max-width: 720px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dc-stat { border-radius: 20px; border: 1px solid var(--line); background: #ffffff; padding: 16px 20px; text-align: right; }
.dc-stat > div { font-size: 13px; line-height: 1.7; font-weight: 700; color: var(--soft); }
.dc-stat b { display: block; margin-top: 6px; font-size: 24px; line-height: 1.5; font-weight: 900; color: var(--ink); }
.dc-stat small { font-size: 14px; font-weight: 700; color: var(--soft); }
.dc-stat-g { border-color: #c3dacd; background: #f0f6f2; }
.dc-stat-g > div { color: #3f6b57; }

/* ---------- ماشین‌حساب ---------- */
.dc-modes-w { display: flex; justify-content: center; margin-bottom: 16px; }
.dc-modes { display: flex; gap: 3px; max-width: 100%; overflow-x: auto; border-radius: 15px; background: #e6efe9; padding: 4px; scrollbar-width: none; }
.dc-modes::-webkit-scrollbar { display: none; }
.dtab { flex-shrink: 0; border: none; border-radius: 11px; cursor: pointer; padding: 10px 18px; font-size: 14px; font-weight: 700; background: transparent; color: var(--soft); transition: all .2s; }
.dtab.active { background: #ffffff; color: var(--gd); box-shadow: 0 1px 2px rgba(16,40,32,.08), 0 6px 14px -8px rgba(16,40,32,.2); }
.dc-lbl { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 700; color: var(--sub); }
.dc-hint { margin: 8px 0 0; font-size: 12.5px; line-height: 1.85; color: var(--soft); }
.seg { display: flex; gap: 3px; border-radius: 13px; background: #eef3ef; padding: 4px; }
.seg button { flex: 1; border: none; border-radius: 10px; cursor: pointer; padding: 10px 8px; font-size: 14px; font-weight: 700; background: transparent; color: var(--soft); transition: all .2s; }
.seg button.active { background: #ffffff; color: var(--gd); box-shadow: 0 1px 2px rgba(16,40,32,.08), 0 6px 14px -8px rgba(16,40,32,.2); }
.seg button:disabled { opacity: .45; cursor: not-allowed; background: transparent; color: var(--faint); box-shadow: none; }
.dc-calc-w { position: relative; margin: 0 auto; max-width: 1100px; padding: 0 24px 32px; }
.dc-calc { overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); border-radius: 30px; border: 1px solid #dfe9e3; background: #ffffff; box-shadow: 0 1px 2px rgba(16,40,32,.04), 0 40px 80px -56px rgba(16,48,36,.45); }
.dc-form { display: flex; flex-direction: column; gap: 18px; padding: 34px; }
.dc-f > label { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 700; color: var(--sub); }
.dc-form input[type="text"], .dc-form select { width: 100%; height: 50px; border-radius: 13px; border: 1px solid #d7e3db; background: #ffffff; padding: 0 14px; font-family: inherit; font-size: 15.5px; font-weight: 600; color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s; }
.dc-form input[type="text"]:focus, .dc-form select:focus { border-color: #a9cbb7; box-shadow: 0 0 0 3px rgba(48,111,87,.12); }
.dc-form select:disabled { opacity: .5; cursor: not-allowed; }
.dc-form input.dc-form input::placeholder { color: var(--faint2); font-weight: 600; }
.dc-check { position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; border-radius: 16px; border: 1px solid var(--line); background: #fafcfb; cursor: pointer; padding: 14px 16px; transition: all .2s; }
.dc-check input { position: absolute; opacity: 0; pointer-events: none; }
.dc-check:has(input:focus-visible) { outline: 2px solid var(--g); outline-offset: 2px; }
.dc-chk { display: grid; flex-shrink: 0; height: 22px; width: 22px; margin-top: 2px; place-items: center; border-radius: 7px; border: 1.5px solid #b9c7be; background: #ffffff; }
.dc-chk svg { visibility: hidden; }
.dc-check b { display: block; font-size: 14.5px; font-weight: 800; color: var(--ink); }
.dc-check b + span { font-size: 12.5px; color: var(--soft); }
.dc-check.on { border-color: var(--g); background: #f0f6f2; }
.dc-check.on .dc-chk { border-color: var(--g); background: var(--g); }
.dc-check.on .dc-chk svg { visibility: visible; }
/* یادداشت و هشدار زیر ردیف‌های نتیجه (روی زمینه‌ی سبز) */
.dc-note, .dc-warn { position: relative; margin: 0 0 12px; border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.9; }
.dc-note { background: rgba(255,255,255,.1); color: rgba(255,255,255,.9); }
.dc-warn { background: #fdf0e7; color: #9a3b12; }
.dc-disc { margin: auto 0 0; font-size: 12.5px; line-height: 1.9; color: var(--faint); }
[hidden].dc-f, .dc-check[hidden], .dc-note[hidden], .dc-warn[hidden], .dc-live[hidden], .dc-rows > div[hidden] { display: none; }

.dc-out { position: relative; overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(160deg, #337a5e 0%, #27583f 55%, #1b4230 100%); padding: 34px; }
.dc-out-mark { pointer-events: none; position: absolute; bottom: -50px; left: -20px; height: 220px; opacity: .07; }
.dc-out-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 700; color: rgba(255,255,255,.8); }
.dc-live { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: rgba(255,255,255,.14); padding: 3px 10px; font-size: 11.5px; font-weight: 700; color: #ffffff; }
.dc-live i { height: 6px; width: 6px; border-radius: 999px; background: #7fe0b0; }
.dc-result { position: relative; margin-top: 10px; font-size: clamp(28px, 3.4vw, 40px); font-weight: 900; line-height: 1.3; color: #ffffff; overflow-wrap: anywhere; }
.dc-result span { font-size: 15px; font-weight: 700; color: rgba(255,255,255,.75); }
.dc-basis { position: relative; margin-top: 4px; font-size: 12.5px; color: rgba(255,255,255,.65); }
.dc-rows { position: relative; margin: 18px 0; }
.dc-rows > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: 14px; }
.dc-rows dt { color: rgba(255,255,255,.75); }
.dc-rows dd { margin: 0; font-weight: 800; color: #ffffff; text-align: left; white-space: nowrap; }
.dc-rows dd.hl { color: #a8ecc8; }
.dc-print { position: relative; margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 13px; padding: 12px; font-size: 14.5px; font-weight: 800; border: none; background: #ffffff; color: var(--gd); cursor: pointer; transition: all .2s; }
.dc-print:hover { background: #f1f7f3; }
.dc-print:disabled { border: 1px solid rgba(255,255,255,.25); background: transparent; color: rgba(255,255,255,.5); cursor: not-allowed; }

.dc-strip { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; border-radius: 22px; border: 1px solid #c3dacd; background: linear-gradient(120deg, #eef6f1, #e3f1ec); padding: 18px 22px; }
.dc-strip > div { display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 700; line-height: 1.85; color: var(--ink); }
.dc-strip-ic { display: grid; height: 44px; width: 44px; flex-shrink: 0; place-items: center; border-radius: 13px; background: var(--grad); }
.dc-strip-ic img { height: 22px; display: block; }
.dc-strip > a { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 12px; background: var(--grad); padding: 12px 20px; font-size: 14.5px; font-weight: 700; color: #ffffff; }
.dc-strip > a:hover { color: #ffffff; filter: brightness(1.06); }

/* ---------- عنوان بخش‌ها ---------- */
.dc-head { text-align: center; }
.dc-head h2 { margin: 14px 0 0; font-size: clamp(24px, 3.2vw, 36px); font-weight: 900; line-height: 1.5; color: var(--ink); text-wrap: balance; }
.dc-head p { margin: 12px 0 0; font-size: 15.5px; line-height: 1.95; color: var(--muted); }

/* ---------- جدول سال‌ها و جراحات ---------- */
.dc-sec { position: relative; margin: 0 auto; padding: 80px 24px 0; }
.dc-years { max-width: 900px; }
.dc-inj-sec { max-width: 980px; padding-bottom: 80px; }
.dc-tabs-w { margin-top: 22px; display: flex; justify-content: center; }
.dc-tabs { display: flex; gap: 3px; max-width: 100%; overflow-x: auto; border-radius: 14px; background: #e6efe9; padding: 4px; }
.dc-tabs button { flex-shrink: 0; border: none; border-radius: 10px; cursor: pointer; padding: 9px 18px; font-size: 14px; font-weight: 700; background: transparent; color: var(--soft); transition: all .2s; }
.dc-tabs button[aria-selected="true"] { background: #ffffff; color: var(--gd); box-shadow: 0 1px 2px rgba(16,40,32,.08), 0 6px 14px -8px rgba(16,40,32,.2); }
.dc-tbl-w.dc-inj { margin-top: 18px; }
.dc-inj[hidden] { display: none; }
.dc-tbl-w { margin-top: 28px; overflow: hidden; border-radius: 22px; border: 1px solid #dfe9e3; background: #ffffff; }
.dc-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.dc-tbl th { background: #f0f6f2; padding: 14px 10px; font-size: 13px; font-weight: 800; color: #3f6b57; text-align: center; }
.dc-tbl-years th:nth-child(1) { width: 22%; }
.dc-tbl-inj th:nth-child(1) { width: 46%; }
.dc-tbl-inj th:nth-child(2) { width: 18%; }
.dc-tbl-inj th:nth-child(1), .dc-tbl-inj td:nth-child(1) { text-align: right; padding-inline: 16px 10px; }
.dc-tbl-inj td b { display: block; font-weight: 800; color: var(--ink); }
.dc-tbl-inj td small { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; line-height: 1.8; color: var(--faint); }
.dc-tbl td { padding: 12px 10px; border-top: 1px solid var(--line2); font-size: 14px; text-align: center; }
.dc-tbl tbody tr:nth-child(even) td { background: #fafcfb; }
.dc-tbl td:nth-child(1) { font-weight: 800; color: var(--ink); }
.dc-tbl td:nth-child(2), .dc-tbl td:nth-child(3) { font-weight: 700; font-variant-numeric: tabular-nums; }
.dc-tbl-years td:nth-child(2) { color: #2f3833; }
.dc-tbl-years td:nth-child(3), .dc-tbl-inj td:nth-child(2) { color: var(--gd); }
.dc-tbl-inj td:nth-child(3) { color: #2f3833; }
/* همه‌ی سال‌ها در HTML هستند (برای گوگل)؛ تا زدن «نمایش همه» فقط ۱۲ ردیف اول دیده می‌شود */
.dc-tbl-years:not(.all) tbody tr:nth-child(n+13), .dc-tbl-inj:not(.all) tbody tr:nth-child(n+11) { display: none; }
.dc-more { margin-top: 14px; text-align: center; }
.dc-more[hidden] { display: none; }
.dc-more button { border: 1px solid #cfe0d6; background: #ffffff; cursor: pointer; border-radius: 12px; padding: 10px 20px; font-size: 14px; font-weight: 700; color: var(--gd); }
.dc-more button:hover { background: #f2f6f3; }

/* ---------- راهنما ---------- */
.dc-guide { background: var(--mint); border-top: 1px solid var(--line2); }
.dc-guide-in { margin: 0 auto; max-width: 1000px; padding: 80px 24px 88px; }
.dc-intro { margin: 18px auto 0; max-width: 46rem; text-align: center; font-size: 16.5px; line-height: 2.1; color: var(--sub); text-wrap: pretty; }
.dc-formula { margin: 30px auto 0; max-width: 860px; border-radius: 26px; border: 1px solid #dfe9e3; background: linear-gradient(160deg, #ffffff, #f3f9f5); padding: 30px 32px; box-shadow: 0 1px 2px rgba(16,40,32,.04), 0 30px 60px -48px rgba(16,48,36,.4); }
.dc-f-t { text-align: center; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; color: var(--g); }
.dc-f-row { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.tk { display: inline-flex; align-items: center; border-radius: 10px; border: 1px solid #cfe0d6; background: #ffffff; padding: 10px 14px; font-size: 14.5px; font-weight: 800; line-height: 1.5; white-space: nowrap; color: var(--ink); }
.tk-g { border-color: var(--g); background: var(--g); color: #ffffff; }
.tk .sm { display: none; }
.op { font-size: 22px; font-weight: 900; color: #6b8a79; }
.dc-ex { margin-top: 20px; display: flex; gap: 12px; border-radius: 16px; background: var(--mint2); padding: 14px 16px; }
.dc-ex > span { display: grid; height: 30px; min-width: 30px; flex-shrink: 0; place-items: center; border-radius: 9px; background: var(--g); padding: 0 6px; font-size: 13px; font-weight: 900; color: #ffffff; }
.dc-ex > div { min-width: 0; }
.dc-ex-main { margin: 0; font-size: 15px; font-weight: 700; line-height: 2; color: #27402f; }
.dc-ex-sub { margin: 2px 0 0; font-size: 13px; line-height: 1.9; color: #54705f; }
.dc-cards { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dc-card { display: flex; flex-direction: column; scroll-snap-align: start; border-radius: 24px; border: 1px solid #d3e2d9; background: #ffffff; padding: 24px; box-shadow: 0 1px 2px rgba(16,40,32,.04); }
.dc-card-ic { display: grid; height: 46px; width: 46px; place-items: center; border-radius: 14px; background: var(--mint2); color: var(--g); }
.dc-card h3 { margin: 16px 0 0; font-size: 17.5px; font-weight: 800; line-height: 1.7; color: var(--ink); }
.dc-card p { margin: 8px 0 0; font-size: 14.5px; line-height: 2.05; color: var(--muted); }

/* ---------- پرسش‌ها (مثل صفحه‌ی تماس) ---------- */
.dc-faq { background: #ffffff; border-top: 1px solid var(--line2); }
.dc-faq-in { margin: 0 auto; max-width: 820px; padding: 80px 24px 88px; }
.faqs { margin-top: 32px; display: flex; flex-direction: column; gap: 10px; }
.faqs details { overflow: hidden; border-radius: 18px; border: 1px solid #e3ece6; background: #ffffff; transition: all .2s; }
.faqs details[open] { border-color: #cfe0d6; box-shadow: 0 18px 40px -30px rgba(16,48,36,.4); }
.faqs summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; padding: 18px 20px; list-style: none; font-size: 15.5px; font-weight: 800; color: var(--ink); }
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary:focus-visible { outline: 2px solid var(--g); outline-offset: -2px; border-radius: 18px; }
.fq-ic { display: grid; flex-shrink: 0; height: 30px; width: 30px; place-items: center; border-radius: 10px; background: var(--mint2); color: var(--g); transition: transform .25s; }
.faqs details[open] .fq-ic { background: var(--g); color: #ffffff; transform: rotate(45deg); }
.faqs details p { margin: 0; padding: 0 20px 20px; font-size: 15px; line-height: 2.05; color: var(--muted); animation: rise .3s var(--ease) both; }

/* ---------- موبایل ---------- */
@media (max-width: 820px) {
  .dc-hero { padding: 32px 20px 28px; }
  .dc-stat { padding: 12px 14px; }
  .dc-stat > div { font-size: 11.5px; }
  .dc-stat b { font-size: 17px; }
  .dc-stat small { font-size: 11.5px; }
  .dc-calc-w { padding: 0 14px 32px; }
  .dc-calc { grid-template-columns: minmax(0, 1fr); }
  .dc-form, .dc-out { padding: 22px 20px; }
  .dc-strip { flex-direction: column; align-items: stretch; padding: 18px; }
  .dc-strip > div { align-items: flex-start; font-size: 14px; }
  .dc-sec { padding: 56px 14px 0; }
  .dc-inj-sec { padding-bottom: 56px; }
  .dc-guide-in, .dc-faq-in { padding: 56px 20px 64px; }
  .dtab { padding: 9px 11px; font-size: 13px; }
  .dc-tabs button { padding: 8px 12px; font-size: 13px; }
  .dc-tbl td { font-size: 13px; }
  .dc-tbl-years th:nth-child(1) { width: 56px; }
  .dc-tbl-inj th:nth-child(1) { width: 44%; }
  .dc-tbl-inj th:nth-child(2) { width: 64px; }
  .dc-tbl-inj th:nth-child(1), .dc-tbl-inj td:nth-child(1) { padding-inline: 12px 6px; }
  .dc-ex-main { font-size: 14px; }
  .dc-tbl th, .dc-tbl td { padding-inline: 6px; }
  .dc-tbl th:nth-child(1) { width: 64px; }
  .dc-tbl th:nth-child(2) { width: 76px; }
  .dc-formula { padding: 20px 10px; }
  .dc-f-row { gap: 3px; flex-wrap: nowrap; }
  .tk { padding: 5px 5px; font-size: min(10.5px, 2.8vw); }
  .tk .lg { display: none; }
  .tk .sm { display: inline; }
  .op { font-size: min(14px, 3.6vw); }
  /* کارت‌های راهنما: ردیف افقی با اسکرول */
  .dc-cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -20px; padding: 0 20px 8px; scroll-padding: 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .faqs details p { animation: none; }
}
