/* فاز ۸۰ — ابزارهای مهاجرت (نامه‌نویس، چک‌لیست ویزا، ادغام PDF، ماشین‌حساب). همه‌ی اندازه‌ها این بالا. */
:root {
  --tl-max-w: 1180px;
  --tl-gutter: 16px;
  --tl-radius: 18px;
  --tl-ink: var(--p-900, #10302b);
  --tl-muted: #5f7673;
  --tl-line: #e2ebe8;
  --tl-soft: var(--p-50, #f4f8f6);
  --tl-green: var(--p-600, #0f7a4f);
  --tl-green-2: var(--p-300, #2dd4a8);
  --tl-gold: #c9a227;
  --tl-red: #b42318;
  --tl-hero-a: var(--p-900, #10302b);
  --tl-hero-b: var(--p-800, #1d5246);
  --tl-card-min: 250px;
  --tl-editor-h: 560px;
}
.tl { max-width: var(--tl-max-w); margin: 0 auto; padding: 0 var(--tl-gutter) 40px; color: var(--tl-ink); }
.tl-hero { background: linear-gradient(135deg, var(--tl-hero-a), var(--tl-hero-b)); color: #eaf5f1; padding: 30px 0 34px; margin-bottom: 20px; }
.tl-hero h1 { color: #fff !important; font-size: 28px; font-weight: 900; margin: 0 0 6px; }
.tl-hero p { color: #bfd9d2; margin: 0; line-height: 1.9; max-width: 780px; }
.tl-hero .tl-crumb { color: var(--p-300, #9fd8c7); font-size: 13.5px; margin-bottom: 4px; }
.tl-hero .tl-crumb a { color: var(--p-300, #9fd8c7); text-decoration: none; }
.tl-flash { border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; font-weight: 700; }
.tl-flash.ok { background: var(--p-100, #e6f6ee); color: var(--p-700, #0f5e3e); } .tl-flash.error { background: #fdecee; color: #8b1d25; }
.tl-flash.warn { background: #fff7e0; color: #6b4e00; }
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tl-card-min), 1fr)); gap: 14px; }
.tl-tile { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--tl-line); border-radius: var(--tl-radius);
  padding: 18px; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.tl-tile:hover { box-shadow: 0 10px 28px rgba(16, 48, 43, .1); transform: translateY(-2px); color: inherit; }
.tl-tile .ic { font-size: 30px; }
.tl-tile b { font-size: 17px; }
.tl-tile span { color: var(--tl-muted); font-size: 13.5px; line-height: 1.8; }
.tl-tile .q { margin-top: auto; font-size: 12.5px; color: var(--tl-green); font-weight: 800; }
.tl-box { background: #fff; border: 1px solid var(--tl-line); border-radius: var(--tl-radius); padding: 18px; margin-bottom: 14px; }
.tl-box h2 { font-size: 18px; font-weight: 900; margin: 0 0 10px; }
.tl-box h3 { font-size: 15.5px; font-weight: 900; margin: 0 0 8px; }
.tl-note { color: var(--tl-muted); font-size: 13px; line-height: 1.9; }
.tl-two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tl-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.tl-field label { font-weight: 800; font-size: 13.5px; }
.tl-field small { color: var(--tl-muted); font-size: 12px; }
.tl-input, .tl-field input, .tl-field select, .tl-field textarea { width: 100%; border: 1px solid var(--tl-line); border-radius: 11px;
  padding: 9px 11px; font-family: inherit; font-size: 14.5px; background: #fff; }
.tl-field textarea { min-height: 90px; resize: vertical; line-height: 1.8; }
.tl-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 11px; padding: 9px 16px; font-weight: 800;
  text-decoration: none; border: 1px solid transparent; font-size: 14px; cursor: pointer; font-family: inherit; }
.tl-btn.primary { background: var(--tl-green); color: #fff; } .tl-btn.primary:hover { color: #fff; filter: brightness(1.08); }
.tl-btn.line { background: #fff; color: var(--tl-ink); border-color: var(--tl-line); }
.tl-btn.ghost { background: var(--tl-soft); color: var(--tl-ink); }
.tl-btn.danger { background: #fff; color: var(--tl-red); border-color: #f3c7c3; }
.tl-btn.gold { background: linear-gradient(90deg, #b8860b, #e0b84a); color: #fff; }
.tl-btn.sm { padding: 6px 11px; font-size: 13px; }
.tl-btn[disabled] { opacity: .55; cursor: not-allowed; }
.tl-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 12px; }
.tl-kind { border: 2px solid var(--tl-line); border-radius: 14px; padding: 12px; cursor: pointer; display: block; }
.tl-kind input { display: none; }
.tl-kind:has(input:checked) { border-color: var(--tl-green); background: #f2fbf7; }
.tl-kind b { display: block; font-size: 15px; } .tl-kind small { color: var(--tl-muted); }
.tl-chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 800; background: var(--tl-soft); }
.tl-chip.ok { background: var(--p-100, #e6f6ee); color: var(--tl-green); } .tl-chip.warn { background: #fff7e0; color: #7a5b00; }
.tl-chip.gold { background: #fff3cf; color: #7a5b00; }
.tl-list { display: grid; gap: 8px; }
.tl-item { display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid var(--tl-line); border-radius: 12px;
  padding: 10px 12px; text-decoration: none; color: inherit; background: #fff; }
.tl-item:hover { background: var(--tl-soft); color: inherit; }
.tl-ltr { direction: ltr; unicode-bidi: isolate; }
.tl-paper { direction: ltr; text-align: left; font-family: Georgia, "Times New Roman", serif; font-size: 15px; line-height: 1.75;
  min-height: var(--tl-editor-h); width: 100%; border: 1px solid var(--tl-line); border-radius: 12px; padding: 18px; background: #fffef9; resize: vertical; }
.tl-subject { direction: ltr; text-align: left; font-weight: 800; }
.tl-chat { display: flex; gap: 8px; }
.tl-chat input { flex: 1; }
.tl-tips li { margin-bottom: 6px; line-height: 1.8; font-size: 13.5px; }
.tl-picker { position: relative; }
.tl-picker-list { position: absolute; inset-inline: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--tl-line); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12); max-height: 320px; overflow: auto; display: none; }
.tl-picker-list button { display: block; width: 100%; text-align: start; border: 0; border-bottom: 1px solid #eef3f1; background: #fff; padding: 9px 12px;
  font-family: inherit; cursor: pointer; direction: ltr; text-align: left; font-size: 13.5px; }
.tl-picker-list button:hover { background: var(--tl-soft); }
.tl-picked { margin-top: 6px; }
/* چک‌لیست */
.tl-check { display: grid; gap: 8px; }
.tl-ci { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; border: 1px solid var(--tl-line); border-radius: 14px; padding: 12px; background: #fff; }
.tl-ci.done { background: #f2fbf7; border-color: #bfe6d3; }
.tl-ci.done .t { text-decoration: line-through; text-decoration-color: rgba(15, 122, 79, .45); }
.tl-ci input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--tl-green); margin-top: 3px; }
.tl-ci .t { font-weight: 900; } .tl-ci .d { color: var(--tl-muted); font-size: 13.5px; line-height: 1.8; }
.tl-ci .n { color: var(--tl-muted); font-size: 12px; margin-inline-end: 6px; }
.tl-meter { height: 12px; background: #e7eeec; border-radius: 99px; overflow: hidden; }
.tl-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--tl-green), var(--tl-green-2)); transition: width .3s; }
.tl-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tl-tabs a { border: 1px solid var(--tl-line); border-radius: 999px; padding: 7px 14px; font-weight: 800; font-size: 13.5px; text-decoration: none; color: var(--tl-ink); background: #fff; }
.tl-tabs a.on { background: var(--tl-ink); color: #fff; border-color: transparent; }
/* ادغام PDF */
.tl-drop { display: block; border: 2px dashed #b9d6cc; border-radius: 16px; padding: 22px; text-align: center; background: #f8fcfa; cursor: pointer; }
.tl-drop.over { background: var(--p-100, #e6f6ee); border-color: var(--tl-green); }
.tl-files { display: grid; gap: 8px; margin-top: 12px; }
.tl-file { display: grid; grid-template-columns: auto auto 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--tl-line); border-radius: 12px;
  padding: 8px 10px; background: #fff; }
.tl-file.drag { opacity: .4; }
.tl-handle { cursor: grab; font-size: 18px; color: var(--tl-muted); user-select: none; }
.tl-file .ix { font-weight: 900; color: var(--tl-green); min-width: 22px; text-align: center; }
.tl-file input { border: 1px solid var(--tl-line); border-radius: 8px; padding: 6px 8px; font-family: inherit; width: 100%; direction: ltr; }
.tl-file small { color: var(--tl-muted); display: block; font-size: 11.5px; direction: ltr; text-align: left; }
.tl-file .act { display: flex; gap: 4px; }
/* ماشین‌حساب */
.tl-sum { display: grid; gap: 7px; font-size: 14px; }
.tl-sum div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed #edf2f0; padding-bottom: 6px; }
.tl-sum .tot { font-size: 18px; font-weight: 900; border: 0; }
.tl-big { font-size: 30px; font-weight: 900; }
.tl-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tl-kpi { background: var(--tl-soft); border-radius: 14px; padding: 12px; }
.tl-kpi b { display: block; font-size: 20px; } .tl-kpi span { color: var(--tl-muted); font-size: 12.5px; }
.tl-consent { background: #fffaf0; border: 1px solid #f1d98a; border-radius: 14px; padding: 14px; line-height: 1.9; font-size: 14px; }
.tl-modal { position: fixed; inset: 0; background: rgba(10, 25, 22, .55); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.tl-modal.on { display: flex; }
.tl-modal-box { background: #fff; border-radius: 18px; padding: 20px; max-width: 560px; width: 100%; max-height: 90vh; overflow: auto; }
.tl-disclaimer { background: #fff7e0; border-radius: 12px; padding: 12px; line-height: 2; font-size: 14px; }
@media (max-width: 900px) { .tl-two { grid-template-columns: 1fr; } :root { --tl-editor-h: 420px; } }
@media (max-width: 560px) { .tl-hero h1 { font-size: 23px; } .tl-file { grid-template-columns: auto 1fr auto; } .tl-file .ix { display: none; } }

/* فاز ۸۷ — تمرین مصاحبه‌ی سفارت */
:root { --iv-log-h: 62vh; --iv-officer: #eef4f2; --iv-me: var(--p-100, #e6f6ee); --iv-fb: #fffaf0; --iv-star: #c9a227; }
.iv-wrap { max-width: 860px; margin: 0 auto; }
.iv-log { display: flex; flex-direction: column; gap: 10px; max-height: var(--iv-log-h); overflow-y: auto; padding: 4px 2px 10px; }
.iv-msg { border-radius: 16px; padding: 10px 14px; max-width: 88%; line-height: 1.9; overflow-wrap: anywhere; }
.iv-msg .who { display: block; font-size: 12px; font-weight: 800; color: var(--tl-muted); margin-bottom: 2px; }
.iv-msg small { display: block; color: var(--tl-muted); margin-top: 4px; font-size: 12.5px; }
.iv-msg.officer { background: var(--iv-officer); align-self: flex-start; border-start-start-radius: 4px; }
.iv-msg.me { background: var(--iv-me); align-self: flex-end; border-start-end-radius: 4px; }
.iv-fb { background: var(--iv-fb); border: 1px solid #f0e3c0; border-radius: 14px; padding: 8px 14px; font-size: 13.5px; line-height: 1.9; }
.iv-fb p { margin: 2px 0; } .iv-fb summary { cursor: pointer; font-weight: 800; }
.iv-better { background: #fff; border-radius: 10px; padding: 8px 10px; white-space: pre-wrap; }
.iv-stars { color: var(--iv-star); letter-spacing: 2px; }
.iv-answer { background: #fff; border: 1px solid var(--tl-line); border-radius: var(--tl-radius); padding: 12px; margin-top: 8px; }
.iv-answer textarea { width: 100%; border: 1px solid var(--tl-line); border-radius: 11px; padding: 9px 11px; font: inherit; resize: vertical; }
.iv-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.iv-report { margin-top: 14px; }
.iv-score { display: flex; align-items: baseline; gap: 6px; } .iv-score b { font-size: 40px; color: var(--tl-green); }
@media (max-width: 560px) { .iv-msg { max-width: 100%; } :root { --iv-log-h: 58vh; } }
