/* =====================================================================
   SARAMAND — residency.css
   لایه‌ی اختصاصی صفحه‌ی «خدمات اقامتی».
   فقط روی همین صفحه لود می‌شود؛ هیچ قاعده‌ای اینجا نباید صفحات دیگر را
   تغییر بدهد. رنگ‌ها از توکن‌های main.css خوانده می‌شوند تا حالت
   روشن/تیره خودکار درست بماند. همه‌جا inline-start/inline-end (RTL).
   ===================================================================== */

/* توکن‌های محلی این صفحه */
:root {
    --res-panel: var(--navy-800);
    --res-panel-2: var(--navy-700);
    --res-panel-text: #ffffff;
    --res-panel-muted: rgba(255, 255, 255, 0.66);
    --res-panel-line: rgba(255, 255, 255, 0.12);
    --res-tint: rgba(34, 64, 107, 0.06);
    --res-tint-strong: rgba(34, 64, 107, 0.1);
    --res-amber: #b45309;
    --res-amber-bg: rgba(180, 83, 9, 0.08);
    --res-radius: 6px;
}

:root[data-theme="dark"] {
    --res-panel: #151515;
    --res-panel-2: #1e1e1e;
    --res-panel-muted: rgba(255, 255, 255, 0.6);
    --res-panel-line: rgba(255, 255, 255, 0.1);
    --res-tint: rgba(255, 255, 255, 0.04);
    --res-tint-strong: rgba(255, 255, 255, 0.08);
    --res-amber: #fbbf24;
    --res-amber-bg: rgba(251, 191, 36, 0.08);
}

/* ---------------------------------------------------------------
   ۱. نوار پیمایش چسبان داخل صفحه — تب‌های خطی
   --------------------------------------------------------------- */
.res-subnav {
    position: sticky;
    top: var(--header-h);
    z-index: 40;
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid var(--border);
}

.res-subnav__scroller {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.res-subnav__scroller::-webkit-scrollbar {
    display: none;
}

/* وسط‌چین؛ با margin خودکار (نه justify-content) تا وقتی جا نشد، اسکرول
   افقی از ابتدای فهرست شروع شود و لینک اول بریده نشود. */
.res-subnav__link:first-child { margin-inline-start: auto; }
.res-subnav__link:last-child { margin-inline-end: auto; }

.res-subnav__link {
    flex: 0 0 auto;
    position: relative;
    padding: 17px 14px 15px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    transition: color var(--dur-fast) var(--ease);
}

.res-subnav__link::after {
    content: '';
    position: absolute;
    inset-inline: 14px;
    bottom: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform var(--dur) var(--ease);
}

.res-subnav__link:hover {
    color: var(--text);
}

.res-subnav__link.is-active {
    color: var(--text);
}

.res-subnav__link.is-active::after {
    transform: scaleX(1);
}

/* ---------------------------------------------------------------
   ۲. بخش‌ها و عنوان‌ها
   --------------------------------------------------------------- */
.res-sec {
    padding: 96px 0;
    scroll-margin-top: calc(var(--header-h) + 56px);
}

.res-sec--alt {
    background: var(--surface);
}

.res-sec__head {
    max-width: 680px;
    margin: 0 0 44px;
}

.res-sec__head--center {
    margin-inline: auto;
    text-align: center;
}

.res-sec__title {
    font-size: clamp(1.45rem, 2.9vw, 2.1rem);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.025em;
    margin: 0;
    text-wrap: balance;
}

.res-sec__title em {
    font-style: normal;
    font-weight: inherit;
    color: inherit;
}

.res-sec__lede {
    font-size: 0.95rem;
    line-height: 1.95;
    color: var(--text-muted);
    margin: 14px 0 0;
    max-width: 62ch;
    text-wrap: pretty;
}

.res-sec__head--center .res-sec__lede {
    margin-inline: auto;
}

/* «کشور شما در این فهرست نیست؟» — کادر راهنما زیر فهرست کشورها */
.res-more {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    margin-top: 28px;
    padding: 22px 26px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}

.res-more__icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    background: var(--res-tint-strong);
    color: var(--primary);
}

.res-more__text b {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.res-more__text p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.9;
    color: var(--text-muted);
}

.res-more__actions {
    display: flex;
    gap: 10px;
}

.res-more__actions .btn {
    white-space: nowrap;
}

/* ---------------------------------------------------------------
   ۳. سنجش شرایط (ویزارد) — ستون راهنما + پرسش‌ها
   --------------------------------------------------------------- */
.res-check {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-2);
    overflow: hidden;
}

.res-check__aside {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 32px 28px;
    background: var(--res-panel);
    color: var(--res-panel-text);
}

.res-check__aside-title {
    display: block;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.7;
}

.res-check__steps {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.res-check__steps li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--res-panel-muted);
    transition: color var(--dur) var(--ease);
}

/* خط رابط بین دایره‌ها */
.res-check__steps li:not(:last-child)::after {
    content: '';
    position: absolute;
    inset-inline-start: 13px;
    top: calc(50% + 15px);
    height: calc(100% - 22px);
    width: 1px;
    background: var(--res-panel-line);
}

.res-check__steps li > span {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid var(--res-panel-line);
    color: var(--res-panel-muted);
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.res-check__steps li.is-current {
    color: var(--res-panel-text);
}

.res-check__steps li.is-current > span {
    background: #fff;
    border-color: #fff;
    color: var(--navy-800);
}

.res-check__steps li.is-done {
    color: var(--res-panel-text);
}

.res-check__steps li.is-done > span {
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--res-panel-text);
}

.res-check__aside-note {
    margin: auto 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--res-panel-line);
    font-size: 0.78rem;
    line-height: 1.9;
    color: var(--res-panel-muted);
}

.res-check__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.res-check__bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 30px;
    border-bottom: 1px solid var(--border);
}

.res-check__bar-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

.res-check__track {
    display: block;
    flex: 1;
    height: 6px;
    border-radius: var(--radius-sm);
    background: var(--surface-sunken);
    overflow: hidden;
}

:root[data-theme="dark"] .res-check__track {
    background: rgba(255, 255, 255, 0.1);
}

/* قبلاً این span به‌صورت inline رندر می‌شد و width رویش اعمال نمی‌شد؛
   برای همین نوار پیشرفت هیچ‌وقت جلو نمی‌رفت. */
.res-check__fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--grad-primary);
    transition: width var(--dur-slow) var(--ease);
}

.res-check__count {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.res-check__body {
    padding: 34px 30px 32px;
}

.res-check__step[hidden] {
    display: none;
}

.res-check__step:not([hidden]) {
    animation: resFadeIn var(--dur) var(--ease);
}

@keyframes resFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.res-check__q {
    font-size: 1.14rem;
    font-weight: 700;
    line-height: 1.6;
    margin: 0 0 6px;
    text-wrap: balance;
}

.res-check__hint {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin: 0 0 22px;
}

.res-check__opts {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.res-check__opt {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: start;
    width: 100%;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.res-check__opt:hover {
    border-color: var(--border-strong);
    background: var(--res-tint);
}

.res-check__opt:focus-visible {
    outline: none;
    box-shadow: var(--shadow-ring);
}

.res-check__opt-mark {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 3px;
    border-radius: 50%;
    border: 2px solid var(--border-strong);
    position: relative;
    transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.res-check__opt.is-picked {
    border-color: var(--primary);
    background: var(--res-tint);
}

.res-check__opt.is-picked .res-check__opt-mark {
    border-color: var(--primary);
    background: var(--primary);
}

.res-check__opt.is-picked .res-check__opt-mark::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--on-primary);
}

.res-check__opt-text b {
    display: block;
    font-size: 0.93rem;
    font-weight: 700;
    line-height: 1.6;
}

.res-check__opt-text span {
    display: block;
    font-size: 0.79rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 2px;
}

.res-check__nav {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.res-check__nav:has(> [hidden]:only-child) {
    display: none;
}

.res-check__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 18px;
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.res-check__back[hidden] {
    display: none;
}

.res-check__back:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

/* نتیجه */
.res-check__result[hidden] {
    display: none;
}

.res-check__result {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    animation: resFadeIn var(--dur) var(--ease);
}

.res-check__verdict {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 22px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
}

.res-check__verdict-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    color: #fff;
}

.res-check__verdict[data-level="good"] .res-check__verdict-icon { background: #15803d; }
.res-check__verdict[data-level="maybe"] .res-check__verdict-icon { background: #b45309; }
.res-check__verdict[data-level="no"] .res-check__verdict-icon { background: #b91c1c; }

.res-check__verdict-title {
    font-size: 1.08rem;
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.5;
}

.res-check__verdict-text {
    font-size: 0.89rem;
    line-height: 1.85;
    color: var(--text-muted);
    margin: 0;
}

.res-check__notes {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.res-check__notes li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.87rem;
    line-height: 1.8;
    color: var(--text);
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--border);
}

/* رنگ هر نکته فقط با حاشیه و زمینه‌ی ملایم؛ بدون نوار ضخیم کناری */
.res-check__notes li[data-tone="ok"] { border-color: rgba(21, 128, 61, 0.32); background: rgba(21, 128, 61, 0.06); }
.res-check__notes li[data-tone="warn"] { border-color: rgba(180, 83, 9, 0.32); background: rgba(180, 83, 9, 0.06); }
.res-check__notes li[data-tone="bad"] { border-color: rgba(185, 28, 28, 0.32); background: rgba(185, 28, 28, 0.06); }

.res-check__result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.res-check__restart {
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.res-check__restart:hover { color: var(--text); }

.res-check__disclaimer {
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--text-faint);
    margin: 4px 0 0;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
}

/* ---------------------------------------------------------------
   ۴. کارت‌های شرایط
   --------------------------------------------------------------- */
.res-cards {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    counter-reset: rescard;
}

.res-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 26px 26px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    counter-increment: rescard;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

/* شماره‌ی ظریف در گوشه‌ی کارت */
.res-card::after {
    content: counter(rescard, decimal-leading-zero);
    position: absolute;
    top: 24px;
    inset-inline-end: 26px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}

.res-card:hover {
    border-color: var(--border-strong);
    box-shadow: none;
}

.res-card__icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    background: var(--res-tint-strong);
    color: var(--primary);
    margin-bottom: 20px;
}

.res-card h3 {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0 0 9px;
    line-height: 1.55;
}

.res-card p {
    font-size: 0.87rem;
    line-height: 1.95;
    color: var(--text-muted);
    margin: 0 0 18px;
}

.res-card__meta {
    align-self: flex-start;
    margin-top: auto;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--primary-strong);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    background: var(--res-tint-strong);
}

:root[data-theme="dark"] .res-card__meta {
    color: var(--text);
}

/* ---------------------------------------------------------------
   ۵. چک‌لیست مدارک
   --------------------------------------------------------------- */
.res-docs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

.res-docs__list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.res-doc {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 17px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.res-doc:hover {
    border-color: var(--border-strong);
}

.res-doc:has(input:checked) {
    background: var(--res-tint);
}

.res-doc input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.res-doc__box {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 2px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-strong);
    display: grid;
    place-items: center;
    color: transparent;
    transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.res-doc input:checked ~ .res-doc__box {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
}

.res-doc input:focus-visible ~ .res-doc__box {
    box-shadow: var(--shadow-ring);
}

.res-doc__text {
    min-width: 0;
}

.res-doc__text b {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.7;
    transition: color var(--dur-fast) var(--ease);
}

.res-doc__text span {
    display: block;
    font-size: 0.81rem;
    color: var(--text-muted);
    line-height: 1.85;
    margin-top: 3px;
}

.res-doc input:checked ~ .res-doc__text b {
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.res-doc__tag {
    flex: 0 0 auto;
    align-self: center;
    margin-inline-start: auto;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: var(--surface-sunken);
    color: var(--text-muted);
    white-space: nowrap;
}

:root[data-theme="dark"] .res-doc__tag {
    background: rgba(255, 255, 255, 0.08);
}

.res-doc__tag--must {
    background: rgba(185, 28, 28, 0.08);
    color: #b91c1c;
}

:root[data-theme="dark"] .res-doc__tag--must {
    background: rgba(248, 113, 113, 0.14);
    color: #fca5a5;
}

/* کارت خلاصه: پنل سرمه‌ای */
.res-docs__side {
    position: sticky;
    top: calc(var(--header-h) + 80px);
    padding: 28px 26px;
    border-radius: var(--radius-sm);
    background: var(--res-panel);
    color: var(--res-panel-text);
    box-shadow: var(--shadow-2);
}

.res-docs__ring {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.res-docs__ring-num {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: #fff;
}

.res-docs__ring-label {
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--res-panel-muted);
}

.res-docs__progress {
    height: 6px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
    margin-bottom: 20px;
}

.res-docs__progress i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: #fff;
    transition: width var(--dur) var(--ease);
}

.res-docs__side p {
    font-size: 0.82rem;
    line-height: 1.95;
    color: var(--res-panel-muted);
    margin: 0 0 20px;
}

.res-docs__side-actions {
    display: grid;
    gap: 9px;
}

.res-docs__side-actions .btn {
    width: 100%;
    font-size: 0.84rem;
    padding: 11px 18px;
}

.res-docs__side .btn--primary {
    background: #fff;
    border-color: #fff;
    color: var(--navy-800);
}

.res-docs__side .btn--primary:hover {
    background: #fff;
    border-color: #fff;
    outline: 1px solid #fff;
    outline-offset: 3px;
}

.res-docs__side .btn--outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.res-docs__side .btn--outline:hover {
    border-color: #fff;
}

/* ---------------------------------------------------------------
   ۶. خط زمانی مراحل
   --------------------------------------------------------------- */
.res-timeline {
    position: relative;
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.res-timeline::before {
    content: '';
    position: absolute;
    top: 24px;
    bottom: 24px;
    inset-inline-start: 23px;
    width: 2px;
    background: var(--border);
}

.res-tl {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.res-tl__num {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    margin-top: 10px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1rem;
    font-weight: 800;
    background: var(--primary);
    color: var(--on-primary);
    box-shadow: 0 0 0 6px var(--bg);
}

.res-sec--alt .res-tl__num {
    box-shadow: 0 0 0 6px var(--surface);
}

.res-tl__card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 24px;
    padding: 22px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.res-tl__card:hover {
    border-color: var(--border-strong);
    box-shadow: none;
}

.res-tl__top {
    display: contents;
}

.res-tl__title {
    grid-column: 1;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.6;
}

.res-tl__time {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--primary-strong);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    background: var(--res-tint-strong);
    white-space: nowrap;
}

:root[data-theme="dark"] .res-tl__time {
    color: var(--text);
}

.res-tl__card p {
    grid-column: 1 / -1;
    font-size: 0.87rem;
    line-height: 1.95;
    color: var(--text-muted);
    margin: 0;
}

.res-tl__who {
    grid-column: 1 / -1;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    font-size: 0.77rem;
    font-weight: 600;
    color: var(--text-faint);
}

/* ---------------------------------------------------------------
   ۷. برآوردگر هزینه
   --------------------------------------------------------------- */
.res-cost {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 24px;
    align-items: start;
}

.res-cost__form,
.res-cost__out {
    padding: 30px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}

.res-cost__out {
    position: sticky;
    top: calc(var(--header-h) + 80px);
    background: var(--res-panel);
    border-color: transparent;
    color: var(--res-panel-text);
    box-shadow: var(--shadow-2);
}

.res-cost__field {
    margin-bottom: 22px;
}

.res-cost__field:last-child {
    margin-bottom: 0;
}

.res-cost__field > label,
.res-cost__legend {
    display: block;
    font-size: 0.83rem;
    font-weight: 700;
    margin-bottom: 9px;
    color: var(--text);
}

.res-cost__note {
    display: block;
    font-size: 0.76rem;
    font-weight: 400;
    color: var(--text-faint);
    line-height: 1.7;
    margin-top: 6px;
}

.res-cost__input {
    position: relative;
    display: flex;
    align-items: center;
}

.res-cost__input input {
    width: 100%;
    padding: 13px 16px;
    padding-inline-end: 62px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.res-cost__input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-ring);
}

.res-cost__unit {
    position: absolute;
    inset-inline-end: 14px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-faint);
    pointer-events: none;
}

.res-cost__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.res-cost__chip {
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
}

.res-cost__chip:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.res-cost__chip.is-on {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
}

.res-cost__rates {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed var(--border);
}

.res-cost__rates summary {
    cursor: pointer;
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--primary-strong);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.res-cost__rates summary::-webkit-details-marker {
    display: none;
}

.res-cost__rates summary::before {
    content: '+';
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid currentColor;
    font-size: 0.9rem;
    line-height: 1;
}

.res-cost__rates[open] summary::before {
    content: '−';
}

.res-cost__rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.res-cost__rates-grid label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.res-cost__rates-grid input {
    width: 100%;
    padding: 10px 13px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

.res-cost__rates-grid input:focus {
    outline: none;
    border-color: var(--primary);
}

.res-cost__out h3 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--res-panel-muted);
    margin: 0 0 14px;
}

.res-cost__total {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: #fff;
    font-variant-numeric: tabular-nums;
    margin-bottom: 6px;
}

.res-cost__total small {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--res-panel-muted);
    margin-inline-start: 6px;
}

.res-cost__total-sub {
    font-size: 0.8rem;
    color: var(--res-panel-muted);
    margin: 0 0 22px;
    font-variant-numeric: tabular-nums;
}

.res-cost__rows {
    display: grid;
    gap: 2px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.res-cost__rows li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--res-panel-line);
    font-size: 0.86rem;
}

.res-cost__rows li:last-child {
    border-bottom: none;
}

.res-cost__rows li span:first-child {
    color: var(--res-panel-muted);
}

.res-cost__rows li b {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.res-cost__rows li.is-total {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-bottom: none;
}

.res-cost__rows li.is-total span:first-child {
    color: #fff;
    font-weight: 700;
}

.res-cost__warn {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--res-panel-line);
    font-size: 0.79rem;
    line-height: 1.9;
    color: var(--res-panel-muted);
}

.res-cost__warn b {
    color: #fff;
}

.res-cost__warn svg {
    flex: 0 0 auto;
    margin-top: 3px;
    color: #fbbf24;
}

/* ---------------------------------------------------------------
   ۸. کشورها — با پرچم
   --------------------------------------------------------------- */
.res-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

/* وسط‌چین؛ margin خودکار تا در موبایل (نوار اسکرولی) دکمه‌ی اول بریده نشود */
.res-filter__btn:first-child { margin-inline-start: auto; }
.res-filter__btn:last-child { margin-inline-end: auto; }

.res-filter__btn {
    flex: 0 0 auto;
    font: inherit;
    font-size: 0.83rem;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--dur-fast) var(--ease);
}

.res-filter__btn:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.res-filter__btn.is-on {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
}

.res-countries {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
}

.res-country {
    display: flex;
    flex-direction: column;
    padding: 22px 22px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.res-country[hidden] {
    display: none;
}

.res-country:hover {
    border-color: var(--border-strong);
    box-shadow: none;
}

.res-country__top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.res-country__flag {
    flex: 0 0 auto;
    display: block;
    width: 42px;
    height: 28px;
    border-radius: 5px;
    object-fit: cover;
    /* خط نازک دور پرچم تا پرچم‌های سفید روی کارت سفید گم نشوند */
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(6, 14, 28, 0.12);
}

:root[data-theme="dark"] .res-country__flag {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.res-country__name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.5;
}

.res-country__region {
    display: block;
    font-size: 0.74rem;
    color: var(--text-faint);
    line-height: 1.6;
}

.res-country__rows {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.res-country__rows li {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    font-size: 0.82rem;
    line-height: 1.8;
}

.res-country__rows li span:first-child {
    color: var(--text-faint);
    font-weight: 600;
}

.res-country__rows li span:last-child {
    font-weight: 600;
    color: var(--text);
}

/* ---------------------------------------------------------------
   ۹. جدول مقایسه
   --------------------------------------------------------------- */
.res-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    -webkit-overflow-scrolling: touch;
}

.res-table {
    width: 100%;
    min-width: 660px;
    border-collapse: collapse;
    font-size: 0.87rem;
}

.res-table caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.res-table th,
.res-table td {
    padding: 17px 20px;
    text-align: start;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.85;
}

.res-table thead th {
    background: var(--surface);
    font-weight: 700;
    font-size: 0.86rem;
    white-space: nowrap;
}

.res-table thead th:first-child {
    font-weight: 600;
    color: var(--text-muted);
}

.res-table tbody th {
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    width: 1%;
}

.res-table tbody tr:last-child th,
.res-table tbody tr:last-child td {
    border-bottom: none;
}

.res-table td {
    color: var(--text-muted);
}

.res-table td.res-table__pick {
    color: var(--text);
    font-weight: 600;
}

.res-table__pick {
    background: var(--res-tint);
}

.res-table__badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--on-primary);
    margin-inline-start: 8px;
    vertical-align: middle;
}

.res-table a {
    color: var(--primary);
    font-weight: 700;
}

/* ---------------------------------------------------------------
   ۱۰. اشتباهات رایج
   --------------------------------------------------------------- */
.res-warns {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.res-warn {
    display: flex;
    flex-direction: column;
    padding: 22px 22px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}

.res-warn__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* شماره‌ی فارسی در دایره‌ی کهربایی کم‌رنگ */
.res-warn__num {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--res-amber);
    background: var(--res-amber-bg);
    border: 1px solid color-mix(in srgb, var(--res-amber) 30%, transparent);
}

.res-warn h3 {
    font-size: 0.98rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.6;
}

.res-warn p {
    font-size: 0.86rem;
    line-height: 1.95;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.res-warn__fix {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: auto;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--res-tint-strong);
    font-size: 0.82rem;
    line-height: 1.85;
    color: var(--text);
}

.res-warn__fix svg {
    flex: 0 0 auto;
    margin-top: 3px;
    color: var(--primary);
}

.res-warn__fix b {
    display: block;
    color: var(--primary-strong);
}

:root[data-theme="dark"] .res-warn__fix b {
    color: var(--text);
}

.res-warn__fix a {
    color: var(--primary);
    font-weight: 700;
}

/* ---------------------------------------------------------------
   ۱۱. پرسش‌های متداول
   --------------------------------------------------------------- */
.res-faq {
    display: grid;
    gap: 10px;
    max-width: 880px;
    margin-inline: auto;
}

.res-faq__item {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    overflow: hidden;
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.res-faq__item.is-open {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-2);
}

.res-faq__q {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: start;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.7;
    color: var(--text);
    padding: 19px 22px;
    background: none;
    border: none;
    cursor: pointer;
}

.res-faq__q:focus-visible {
    outline: none;
    box-shadow: inset var(--shadow-ring);
}

.res-faq__q > span:not(.res-faq__sign) {
    flex: 1;
}

.res-faq__sign {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--res-tint-strong);
    color: var(--primary);
    transition: transform var(--dur) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.res-faq__item.is-open .res-faq__sign {
    background: var(--primary);
    color: var(--on-primary);
}

.res-faq__a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--dur) var(--ease);
}

.res-faq__item.is-open .res-faq__a {
    grid-template-rows: 1fr;
}

.res-faq__a > div {
    overflow: hidden;
}

.res-faq__a p {
    font-size: 0.88rem;
    line-height: 2;
    color: var(--text-muted);
    margin: 0;
    padding: 0 22px 21px;
}

/* ---------------------------------------------------------------
   ۱۲. مقالات مرتبط
   --------------------------------------------------------------- */
.res-reads {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.res-read {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    overflow: hidden;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.res-read:hover {
    border-color: var(--border-strong);
    box-shadow: none;
    transform: none;
}

.res-read__media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-sunken);
}

.res-read__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}


.res-read__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 20px 20px;
}

.res-read__tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    background: var(--res-tint-strong);
    color: var(--primary-strong);
}

:root[data-theme="dark"] .res-read__tag {
    color: var(--text);
}

.res-read b {
    font-size: 0.97rem;
    font-weight: 700;
    line-height: 1.75;
}

.res-read__text {
    font-size: 0.83rem;
    line-height: 1.9;
    color: var(--text-muted);
}

.res-read__more {
    margin-top: auto;
    padding-top: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.res-read__more svg {
    transition: transform var(--dur-fast) var(--ease);
}


/* ---------------------------------------------------------------
   ۱۳. نوار چسبان موبایل
   --------------------------------------------------------------- */
.res-bar {
    display: none;
}

@media (max-width: 860px) {
    .res-bar {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 120;
        display: flex;
        gap: 10px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: var(--header-bg);
        -webkit-backdrop-filter: blur(16px) saturate(170%);
        backdrop-filter: blur(16px) saturate(170%);
        border-top: 1px solid var(--border);
        transform: translateY(110%);
        transition: transform var(--dur) var(--ease);
    }

    .res-bar.is-up {
        transform: translateY(0);
    }

    .res-bar .btn {
        flex: 1;
        font-size: 0.84rem;
        padding: 11px 14px;
    }

    .res-bar.is-up ~ .floating-support {
        bottom: 84px;
    }
}

/* ---------------------------------------------------------------
   ۱۴. واکنش‌گرایی
   --------------------------------------------------------------- */
@media (max-width: 1100px) {
    .res-reads {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1020px) {
    .res-docs,
    .res-cost {
        grid-template-columns: 1fr;
    }

    .res-docs__side,
    .res-cost__out {
        position: static;
    }

    .res-cards,
    .res-warns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .res-check {
        grid-template-columns: 1fr;
    }

    /* ستون راهنما در عرض کم، به یک نوار افقی چهار مرحله‌ای تبدیل می‌شود */
    .res-check__aside {
        gap: 0;
        padding: 18px 22px;
    }

    .res-check__aside-title,
    .res-check__aside-note {
        display: none;
    }

    .res-check__steps {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .res-check__steps li {
        flex-direction: column;
        gap: 8px;
        padding: 0;
        font-size: 0.74rem;
        text-align: center;
        line-height: 1.5;
    }

    .res-check__steps li:not(:last-child)::after {
        top: 14px;
        inset-inline-start: calc(50% + 20px);
        width: calc(100% - 32px);
        height: 1px;
    }
}

@media (max-width: 860px) {
    .res-subnav {
        top: var(--header-h-mobile);
    }

    .res-sec {
        scroll-margin-top: calc(var(--header-h-mobile) + 52px);
    }
}

@media (max-width: 680px) {
    .res-sec {
        padding: 60px 0;
    }

    .res-sec__head {
        margin-bottom: 30px;
    }

    .res-sec__title {
        font-size: 1.3rem;
    }

    .res-sec__lede {
        font-size: 0.88rem;
        line-height: 1.9;
    }

    .res-subnav__link {
        padding: 15px 11px 13px;
        font-size: 0.8rem;
    }

    .res-subnav__link::after {
        inset-inline: 11px;
    }

    .res-check {
        border-radius: var(--radius-sm);
    }

    .res-check__aside {
        padding: 16px 14px;
    }

    .res-check__steps li {
        font-size: 0.68rem;
    }

    .res-check__bar {
        padding: 14px 18px;
        gap: 10px;
    }

    .res-check__bar-label {
        display: none;
    }

    .res-check__body {
        padding: 24px 18px 22px;
    }

    .res-check__q {
        font-size: 1.02rem;
    }

    .res-check__opts {
        grid-template-columns: 1fr;
    }

    .res-check__opt {
        padding: 14px 16px;
    }

    .res-check__result-actions .btn {
        width: 100%;
    }

    .res-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* کارت فشرده: آیکون کوچک کنار تیتر، متن و برچسب زیرشان. */
    .res-card {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        column-gap: 12px;
        align-items: center;
        padding: 18px 18px 18px;
    }

    .res-card::after {
        top: 18px;
        inset-inline-end: 18px;
    }

    .res-card__icon {
        width: 38px;
        height: 38px;
        border-radius: var(--radius-sm);
        margin-bottom: 0;
    }

    .res-card__icon svg {
        width: 19px;
        height: 19px;
    }

    .res-card h3 {
        margin: 0;
        padding-inline-end: 28px;
        font-size: 0.97rem;
    }

    .res-card p,
    .res-card__meta {
        grid-column: 1 / -1;
    }

    .res-card__meta {
        justify-self: start;
    }

    .res-card p {
        margin: 10px 0 12px;
        font-size: 0.84rem;
        line-height: 1.85;
    }

    /* برچسب «الزامی/مرحله‌ی…» زیر متن می‌رود تا متن تمام عرض را بگیرد. */
    .res-doc {
        flex-wrap: wrap;
        row-gap: 8px;
        padding: 15px 16px;
    }

    .res-doc__text {
        flex: 1 1 calc(100% - 36px);
    }

    .res-doc__tag {
        margin-inline-start: 36px;
    }

    .res-cost__form,
    .res-cost__out,
    .res-docs__side {
        padding: 22px 20px;
    }

    .res-tl {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 14px;
    }

    .res-tl__num {
        width: 36px;
        height: 36px;
        margin-top: 16px;
        font-size: 0.86rem;
        box-shadow: 0 0 0 4px var(--bg);
    }

    .res-sec--alt .res-tl__num {
        box-shadow: 0 0 0 4px var(--surface);
    }

    .res-timeline::before {
        inset-inline-start: 17px;
    }

    .res-tl__card {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .res-tl__time {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
        order: -1;
    }

    /* فیلتر کشورها و کارت‌ها: اسکرول افقی به‌جای ستون بلند */
    .res-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        margin-inline: -20px;
        padding-inline: 20px;
        margin-bottom: 20px;
    }

    .res-filter::-webkit-scrollbar {
        display: none;
    }

    .res-countries,
    .res-reads {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        margin-inline: -20px;
        padding: 4px 20px 12px;
        scroll-padding-inline: 20px;
    }

    .res-countries::-webkit-scrollbar,
    .res-reads::-webkit-scrollbar {
        display: none;
    }

    .res-country,
    .res-read {
        flex: 0 0 84%;
        scroll-snap-align: start;
    }

    .res-country[hidden] {
        display: none;
    }

    .res-country__rows li {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .res-country__rows li span:first-child {
        font-size: 0.74rem;
    }

    /* جدول مقایسه در موبایل به کارت تبدیل می‌شود */
    .res-table-wrap {
        overflow: visible;
        border: none;
        background: none;
        border-radius: 0;
    }

    .res-table {
        min-width: 0;
        display: block;
    }

    .res-table thead {
        display: none;
    }

    .res-table tbody {
        display: grid;
        gap: 12px;
    }

    .res-table tr {
        display: block;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        background: var(--bg-elevated);
        overflow: hidden;
    }

    .res-table tbody th {
        display: block;
        width: auto;
        padding: 11px 14px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        font-size: 0.88rem;
    }

    .res-table td {
        display: grid;
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 10px;
        padding: 8px 14px;
        font-size: 0.82rem;
        line-height: 1.75;
    }

    .res-table td::before {
        content: attr(data-label);
        font-size: 0.76rem;
        font-weight: 700;
        color: var(--text-faint);
    }

    .res-table td.res-table__pick::before {
        color: var(--primary-strong);
    }

    .res-table td:last-child {
        border-bottom: none;
    }

    .res-reads .res-read {
        flex-basis: 78%;
    }

    .res-warns {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .res-warn {
        padding: 18px 18px 16px;
    }

    .res-more {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        gap: 14px;
        padding: 20px 18px;
    }

    .res-more__icon {
        width: 42px;
        height: 42px;
        border-radius: var(--radius-sm);
    }

    .res-more__actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .res-more__actions .btn {
        padding-inline: 10px;
        font-size: 0.84rem;
    }
}

@media (max-width: 480px) {
    .res-filter,
    .res-countries,
    .res-reads {
        margin-inline: -16px;
        padding-inline: 16px;
        scroll-padding-inline: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .res-check__step:not([hidden]),
    .res-check__result {
        animation: none;
    }
}

/* ---------------------------------------------------------------
   ۱۵. چاپ — چک‌لیست مدارک باید تمیز چاپ شود
   --------------------------------------------------------------- */
/* چاپ: فقط چک‌لیست مدارک، همیشه روی کاغذ سفید (حتی در حالت شب) و
   با تیک‌هایی که کاربر زده. دکمه‌ی «چاپ چک‌لیست» (residency.js) همین را
   چاپ می‌کند؛ Ctrl+P روی این صفحه هم همین نتیجه را می‌دهد. */
@page {
    margin: 14mm;
}

@media print {
    :root,
    :root[data-theme="dark"] {
        color-scheme: light;
        --bg: #fff !important;
        --bg-elevated: #fff !important;
        --surface: #fff !important;
        --text: #111 !important;
        --text-muted: #444 !important;
        --text-faint: #666 !important;
        --border: #bbb !important;
        --border-strong: #777 !important;
        --primary: #111 !important;
        --res-tint: transparent !important;
    }

    body > :not(main),
    main > :not(#docs),
    .res-sec__lede,
    .res-docs__side {
        display: none !important;
    }

    body {
        padding: 0;
        background: #fff;
        color: #111;
    }

    #docs {
        padding: 0;
        background: #fff;
    }

    #docs .container {
        max-width: none;
        padding: 0;
    }

    #docs .res-sec__head {
        max-width: none;
        margin-bottom: 18px;
    }

    #docs .res-sec__title {
        font-size: 18pt;
    }

    /* عنوان سند و آدرس سایت زیر تیتر */
    #docs .res-sec__head::after {
        content: "ساراماند · saramand.vip";
        display: block;
        margin-top: 6px;
        font-size: 9pt;
        color: #666;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }

    .res-docs {
        display: block;
    }

    .res-docs__list {
        gap: 8px;
    }

    .res-doc {
        break-inside: avoid;
        padding: 10px 14px;
        border: 1px solid #bbb;
        border-radius: var(--radius-sm);
        background: #fff;
        box-shadow: none;
    }

    .res-doc__box {
        border: 1.5px solid #333;
        background: #fff !important;
        color: transparent;
    }

    .res-doc input:checked ~ .res-doc__box {
        color: #111 !important;
        border-color: #111 !important;
    }

    .res-doc input:checked ~ .res-doc__text b {
        color: #111;
        text-decoration: none;
    }

    .res-doc__tag,
    .res-doc__tag--must {
        background: none !important;
        border: 1px solid #999;
        color: #333 !important;
    }
}

/* باز شدن پرسش: «+» به «−» تبدیل می‌شود (خط عمودی جمع می‌شود)، نه
   اینکه بچرخد و ضربدر شود. */
.res-faq__sign svg line {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform var(--dur) var(--ease), opacity var(--dur-fast) var(--ease);
}
.res-faq__item.is-open .res-faq__sign svg line:first-child {
    transform: scaleY(0);
    opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
    .res-faq__sign svg line { transition: none; }
}
