@font-face {
  font-family: 'Vazirmatn';
  src: url('Vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ink: #12263a;
  --ink-soft: #4a5d70;
  --teal: #0f766e;
  --teal-dark: #0b5a54;
  --teal-soft: #e3f3f0;
  --sand: #fbf7ef;
  --gold: #e0a526;
  --coral: #e4572e;
  --line: #e4e9ee;
  --card: #ffffff;
  --bg: #f1f5f6;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(18, 38, 58, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Vazirmatn', Tahoma, sans-serif; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); line-height: 1.8; padding: 18px 14px 60px; }
.wrap { max-width: 760px; margin: 0 auto; }
.wrap.wide { max-width: 1180px; }

/* ─── سربرگ شبیه کارت پرواز ─── */
.hero {
  position: relative; color: #fff; border-radius: var(--radius); padding: 28px 26px 26px; margin-bottom: 18px;
  background: linear-gradient(135deg, #12263a 0%, #0f5a63 60%, #0f766e 100%);
  box-shadow: var(--shadow); overflow: hidden;
}
.hero::before, .hero::after { content: ''; position: absolute; bottom: -16px; width: 32px; height: 32px; background: var(--bg); border-radius: 50%; }
.hero::before { right: 22%; } .hero::after { left: 22%; }
.hero .deco { position: absolute; left: -20px; top: -20px; width: 190px; opacity: .12; }
.badge { display: inline-block; background: rgba(224,165,38,.95); color: #3b2a00; font-weight: 700; font-size: .78rem; padding: 2px 12px; border-radius: 999px; margin-bottom: 10px; }
.hero h1 { font-size: 1.55rem; font-weight: 800; line-height: 1.5; }
.hero p { opacity: .92; font-size: .95rem; margin-top: 8px; max-width: 560px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 16px; }
.card h2 { font-size: 1.1rem; font-weight: 800; color: var(--ink); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.card h2 .step { background: var(--teal); color: #fff; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; flex: none; }
.lead { color: var(--ink-soft); font-size: .93rem; margin: -6px 0 14px; }

/* ─── هشدار ─── */
.alert { background: #fdecea; color: #8a1f11; border-right: 4px solid var(--coral); padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .93rem; }
.alert ul { padding-right: 18px; }

/* ─── فیلدها ─── */
label.field { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
input[type=text], input[type=password], textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid #cfd8df; border-radius: 12px; font-size: 1rem; background: #fbfdfd; transition: .15s;
}
input[type=text]:focus, input[type=password]:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15,118,110,.12); background: #fff; }
input.ltr { direction: ltr; text-align: left; }
textarea { min-height: 130px; resize: vertical; line-height: 1.9; }
.field-group { margin-bottom: 18px; }

.btn { display: block; width: 100%; padding: 14px; background: var(--teal); color: #fff; border: 0; border-radius: 12px; font-size: 1.02rem; font-weight: 700; cursor: pointer; transition: .15s; }
.btn:hover { background: var(--teal-dark); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn.ghost { background: #fff; color: var(--teal); border: 1.5px solid var(--teal); width: auto; padding: 8px 16px; font-size: .9rem; display: inline-block; text-decoration: none; }
.btn.ghost:hover { background: var(--teal-soft); }
.btn.small { width: auto; padding: 8px 14px; font-size: .88rem; }

.captcha-box { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.captcha-box img { border-radius: 10px; border: 1px solid var(--line); }

/* ─── نوار پیشرفت ─── */
.progress { position: sticky; top: 0; z-index: 20; background: rgba(241,245,246,.92); backdrop-filter: blur(6px); padding: 10px 0 8px; margin: 0 -2px 12px; }
.progress .bar { height: 8px; background: #dbe4e6; border-radius: 999px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--gold)); border-radius: 999px; transition: width .3s; }
.progress small { color: var(--ink-soft); font-size: .8rem; display: block; margin-top: 4px; }

/* ─── گزینه‌های رادیویی و چک‌باکس ─── */
fieldset { border: 0; min-width: 0; }
legend { font-weight: 700; margin-bottom: 8px; font-size: 1rem; padding: 0; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span { display: block; cursor: pointer; transition: .15s; user-select: none; }
.opt input:focus-visible + span { outline: 3px solid rgba(15,118,110,.35); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips .opt span { padding: 9px 18px; border: 1.5px solid #cfd8df; border-radius: 999px; background: #fbfdfd; font-size: .93rem; }
.chips .opt span:hover { border-color: var(--teal); background: var(--teal-soft); }
.chips .opt input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 700; }

.stack { display: grid; gap: 10px; }
.stack .opt span { padding: 13px 16px 13px 16px; border: 1.5px solid #cfd8df; border-radius: 12px; background: #fbfdfd; padding-right: 46px; position: relative; }
.stack .opt span::before { content: ''; position: absolute; right: 15px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border: 2px solid #aab8c2; border-radius: 50%; background: #fff; transition: .15s; }
.stack .opt.check span::before { border-radius: 5px; }
.stack .opt span:hover { border-color: var(--teal); background: var(--teal-soft); }
.stack .opt input:checked + span { border-color: var(--teal); background: var(--teal-soft); font-weight: 700; }
.stack .opt input:checked + span::before { border-color: var(--teal); background: var(--teal); box-shadow: inset 0 0 0 3px #fff; }
.stack .opt.check input:checked + span::before { box-shadow: none; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }

/* ─── مقیاس ۱ تا ۱۰ ─── */
.rate { padding: 16px 0; border-bottom: 1px dashed var(--line); }
.rate:last-of-type { border-bottom: 0; }
.rate legend { display: flex; align-items: baseline; gap: 8px; margin-bottom: 0; }
.rate legend b { color: var(--teal); font-size: .95rem; min-width: 22px; }
.rate .desc { color: var(--ink-soft); font-size: .88rem; margin: 2px 0 10px; padding-right: 30px; }
.scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.scale .opt span { text-align: center; padding: 10px 0; border: 1.5px solid #cfd8df; border-radius: 10px; background: #fbfdfd; font-weight: 600; font-size: .95rem; }
.scale .opt span:hover { border-color: var(--teal); background: var(--teal-soft); }
.scale .opt input:checked + span { background: var(--teal); color: #fff; border-color: var(--teal); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(15,118,110,.3); }
.scale-hint { display: flex; justify-content: space-between; font-size: .76rem; color: #7a8b99; margin-top: 6px; }
.rate.overall { background: linear-gradient(180deg, #fffaf0, #fff); border: 1.5px solid #f1dfb1; border-radius: 14px; padding: 16px 14px; margin-top: 8px; }
.rate.overall .scale .opt input:checked + span { background: var(--gold); border-color: var(--gold); color: #3b2a00; box-shadow: 0 6px 14px rgba(224,165,38,.4); }

.q.missing { animation: shake .4s; outline: 2px solid var(--coral); outline-offset: 6px; border-radius: 12px; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.optional-tag { font-weight: 400; color: #7a8b99; font-size: .8rem; margin-right: 6px; }
.counter { text-align: left; font-size: .78rem; color: #7a8b99; margin-top: 4px; }

/* ─── صفحهٔ تشکر ─── */
.thanks { text-align: center; padding: 38px 20px; }
.thanks .big { font-size: 3.2rem; }
.thanks h2 { justify-content: center; margin: 8px 0 10px; font-size: 1.35rem; }
.thanks p { color: var(--ink-soft); }

footer { text-align: center; color: #8a9aa6; font-size: .8rem; margin-top: 24px; }

@media (max-width: 560px) {
  .hero h1 { font-size: 1.25rem; }
  .card { padding: 18px 16px; }
  .scale { grid-template-columns: repeat(5, 1fr); }
  .rate .desc { padding-right: 0; }
  .hero::before, .hero::after { display: none; }
}

/* ───────── گزارش ───────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 5px; background: var(--teal); }
.stat.gold::before { background: var(--gold); } .stat.coral::before { background: var(--coral); } .stat.navy::before { background: var(--ink); }
.stat small { color: var(--ink-soft); font-size: .84rem; display: block; }
.stat strong { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.5; margin-top: 2px; }
.stat strong em { font-style: normal; font-size: .9rem; font-weight: 500; color: var(--ink-soft); }
.stat .sub { font-size: .8rem; color: #7a8b99; margin-top: 2px; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; margin-bottom: 16px; }
.chart-card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.chart-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid #eef2f4; }
.chart-card.full { grid-column: 1 / -1; }
.chart-box { position: relative; height: 300px; }
.chart-box.tall { height: 420px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--line); }
.tbl th { background: #f4f8f9; color: var(--ink-soft); font-weight: 700; font-size: .84rem; }
.tbl tr:hover td { background: #fafcfc; }
.meter { display: inline-block; vertical-align: middle; width: 90px; height: 8px; background: #e7edf0; border-radius: 99px; overflow: hidden; margin-left: 8px; }
.meter i { display: block; height: 100%; border-radius: 99px; }
.tbl-wrap { overflow-x: auto; }

.comment-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.comment-tools input { flex: 1; min-width: 200px; padding: 10px 14px; }
.comments { display: grid; gap: 12px; }
.comment { border: 1px solid var(--line); border-right: 4px solid var(--teal); border-radius: 12px; padding: 14px 16px; background: #fcfefe; }
.comment p { white-space: pre-wrap; word-break: break-word; }
.comment .meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: #6c7d8a; margin-top: 8px; }
.comment .meta span { background: #eef3f5; padding: 1px 10px; border-radius: 999px; }
.empty { color: #7a8b99; text-align: center; padding: 20px; }

.topbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; justify-content: flex-end; }

@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } .chart-box { height: 260px; } }
@media print {
  body { background: #fff; padding: 0; } .topbar, .comment-tools, .no-print { display: none !important; }
  .stat, .chart-card, .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .hero { background: #12263a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
