/* ==========================================================================
   Espart — Home-customer journey (requires main.css)
   Figma (mobile 360): ۰۴ › ۲ مقاله عیب‌یابی · ۴–۵ انتخاب دستگاه و برند · ۶ پیدا کردن مدل · ۷ عیب‌یاب
   Desktop has no Figma frame: centred column / two-column layouts built from the system's desktop patterns.
   ========================================================================== */
.journey { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; padding-bottom: 24px; }
.journey__sec { display: flex; flex-direction: column; gap: 12px; }
.journey__title { display: none; }
.appbar .icon-btn:last-child { margin-inline-start: auto; }

/* Device tiles */
.tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 104px;
  padding: 16px 8px; border: 1px solid var(--gray-300); border-radius: 12px; background: var(--white); cursor: pointer; transition: border-color .15s;
}
.tile:hover { border-color: var(--gray-500); }
.tile input { position: absolute; opacity: 0; width: 0; height: 0; }
.tile__img { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 8px; background: var(--gray-200); color: var(--gray-700); }
.tile__img .ic { width: 28px; height: 28px; stroke-width: 1.5; }
.tile__label { font-weight: 500; font-size: 13px; line-height: 22px; color: var(--gray-900); white-space: nowrap; }
.tile:has(input:checked) { border: 2px solid var(--primary); background: var(--primary-50); }
.tile:has(input:checked) .tile__label { color: var(--primary); }
.tile:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--primary-100); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Model plate guide */
.plate-guide { gap: 12px; }
.plate-guide .card__title { font-size: 16px; line-height: 26px; }
.plate { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px dashed var(--gray-500); border-radius: 8px; background: var(--gray-100); direction: ltr; text-align: left; }
.plate__brand { font-weight: 900; font-size: 13px; line-height: 22px; color: var(--gray-900); }
.plate__model { padding: 4px 8px; border: 2px solid var(--accent); border-radius: 6px; background: var(--accent-50); font-weight: 700; font-size: 14px; line-height: 24px; color: var(--gray-900); }
.plate__meta { font-weight: 400; font-size: 12px; line-height: 20px; color: var(--gray-600); white-space: pre-wrap; }

[data-model-field]:not(.inp--ok) .inp__wrap > .ic { display: none; }
.journey__note { font-weight: 400; font-size: 12px; line-height: 20px; color: var(--gray-600); text-align: center; }

/* Troubleshooter */
.trouble__aside, .trouble__results { display: flex; flex-direction: column; gap: 12px; }
.device-card { display: flex; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--gray-300); border-radius: 12px; background: var(--white); }
.device-card__img { display: flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 8px; background: var(--gray-200); color: var(--gray-700); }
.device-card__img .ic { width: 22px; height: 22px; stroke-width: 1.5; }
.device-card__text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.device-card__text b { font-weight: 700; font-size: 14px; line-height: 24px; color: var(--gray-900); }
.device-card__text span { font-weight: 400; font-size: 12px; line-height: 20px; color: var(--gray-600); }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.results-head small { font-weight: 400; font-size: 12px; line-height: 20px; color: var(--gray-600); }
.tres { display: flex; align-items: flex-start; gap: 16px; padding: 16px; border: 1px solid var(--gray-300); border-radius: 12px; background: var(--white); }
.tres--best { border: 2px solid var(--primary); }
.tres__body { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
.tres__head { display: flex; align-items: center; gap: 8px; }
.tres__name { font-weight: 700; font-size: 16px; line-height: 26px; color: var(--gray-900); }
.tres__badge { padding: 0 8px; border-radius: 4px; background: var(--primary); color: var(--white); font-weight: 700; font-size: 12px; line-height: 20px; white-space: nowrap; }
.tres__code { font-weight: 400; font-size: 12px; line-height: 20px; color: var(--gray-600); }
.tres__desc { font-weight: 400; font-size: 13px; line-height: 22px; color: var(--gray-700); }
.tres__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-top: 4px; }
.tres__test { display: flex; align-items: center; gap: 4px; font-weight: 500; font-size: 12px; line-height: 20px; color: var(--primary); }
.tres__test .ic { width: 16px; height: 16px; }
.tres__match { display: flex; flex-direction: column; align-items: center; flex: none; width: 72px; padding: 8px 0; border-radius: 8px; background: var(--gray-200); color: var(--gray-700); }
.tres__match b { font-weight: 900; font-size: 20px; line-height: 32px; }
.tres__match span { font-weight: 500; font-size: 12px; line-height: 20px; }
.tres--best .tres__match { background: var(--primary-50); }
.tres--best .tres__match b { color: var(--primary); }

/* Article */
.crumbs--m { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 400; font-size: 12px; line-height: 20px; color: var(--gray-700); }
.crumbs--m .ic { width: 14px; height: 14px; color: var(--gray-600); }
.crumbs--m [aria-current] { font-weight: 500; color: var(--gray-900); }
.art { display: flex; flex-direction: column; gap: 12px; }
.art__title { font-weight: 900; font-size: 20px; line-height: 32px; color: var(--gray-900); }
.art .art__meta { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 12px; line-height: 20px; color: var(--gray-700); }
.art__meta .ic { width: 14px; height: 14px; }
.art__video {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 180px;
  border-radius: 12px; background: var(--gray-200); color: var(--gray-700); font-weight: 500; font-size: 12px; line-height: 20px;
}
.art__video .ic { width: 44px; height: 44px; stroke-width: 1.2; }
.art__video:hover { background: var(--gray-300); }
.art p { font-weight: 400; font-size: 16px; line-height: 28px; color: var(--gray-700); }
.art h2 { font-weight: 700; font-size: 16px; line-height: 26px; color: var(--gray-900); }
.related-parts { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: var(--primary-50); }
.related-parts__title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; line-height: 26px; color: var(--gray-900); }
.related-parts__title .ic { width: 20px; height: 20px; color: var(--primary); }
.art-page__aside { padding-top: 24px; padding-bottom: 24px; }
.art-page__main { padding-top: 24px; padding-bottom: 8px; }
.journey__gap { margin-top: 20px; }

@media (min-width: 1200px) {
  .journey { gap: 16px; padding-top: 24px; padding-bottom: 64px; }
  .journey__title { display: block; font-weight: 700; font-size: 28px; line-height: 42px; color: var(--gray-900); }
  .journey--narrow > * { width: 100%; max-width: 760px; margin-inline: auto; }
  .journey--narrow .crumbs { max-width: 760px; }
  .journey .crumbs--m { display: none; }
  .tiles { gap: 12px; }
  .tile { flex: 1 1 0; }
  .journey__cta { display: flex !important; justify-content: flex-end; }
  .journey__cta .btn { width: auto; }
  .trouble { display: grid; grid-template-columns: 380px minmax(0, 1fr); grid-template-areas: "crumbs crumbs" "title title" "aside results"; gap: 16px 32px; align-items: start; }
  .trouble > .crumbs { grid-area: crumbs; }
  .trouble > .journey__title { grid-area: title; }
  .trouble__aside { grid-area: aside; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 24px; }
  .trouble__results { grid-area: results; display: flex; flex-direction: column; gap: 12px; }
  .trouble__results .tres__actions { flex-direction: row-reverse; justify-content: space-between; align-items: center; }
  .art-page { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; padding-top: 24px; padding-bottom: 64px; }
  .art-page__main, .art-page__aside { padding: 0; }
  .journey__gap { margin-top: 12px; }
  .art-page__aside { position: sticky; top: 24px; }
  .art { gap: 16px; }
  .art__title { font-size: 32px; line-height: 48px; }
  .art__video { height: 420px; }
  .art h2 { font-size: 20px; line-height: 32px; margin-top: 8px; }
}
