/* «خانه‌ی آیلتس» (templates/assessments/ielts_home.html). Soft Precision: calm surfaces, hairline + soft shadow, tabular
   numbers. Design research 2026-11-15: ranges on one fixed 3-9 track (a number line, so the track itself stays LTR in the
   RTL page; the plan's progress bar fills from the reading start like every other bar), target as a thin tick, no red,
   no ticking clock, empty states drawn empty. Colours come from the theme tokens, so dark mode follows by itself. */

.ih { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block-end: 48px; }
.ih-num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; font-family: var(--f-body); }

/* --- hero --- */
.ih-hero {
  background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card);
  padding: 22px 22px 18px; display: grid; gap: 10px;
  background-image: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%);
}
.ih-kicker { margin: 0; font-size: var(--fs-sm); color: var(--accent-ink); display: flex; align-items: center; gap: 6px; font-weight: 600; }
.ih-kicker .ic { inline-size: 16px; block-size: 16px; }
.ih-title { margin: 0; font-size: var(--fs-h1); line-height: var(--lh-display); letter-spacing: var(--ls-title); }
.ih-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.ih-fact { margin: 0; font-size: var(--fs-md); }
.ih-fact b.ih-num, .ih-fact b { font-size: var(--fs-xl); font-weight: 700; }
.ih-note { margin: 4px 0 0; font-size: var(--fs-xs); color: var(--ink-2); display: flex; gap: 6px; align-items: flex-start; }
.ih-note .ic { inline-size: 14px; block-size: 14px; flex: none; margin-block-start: 3px; }

/* --- sections --- */
.ih-sec { display: grid; gap: 12px; }
.ih-sec-head h2 { margin: 0; font-size: var(--fs-lg); }
.ih-sec-head p { margin: 2px 0 0; }

/* --- the four skill cards --- */
.ih-skills { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.ih-skill {
  --c: var(--accent);
  background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card);
  padding: 16px 16px 14px; display: grid; gap: 8px; align-content: start;
}
.ih-skill.listening { --c: #2f7fd8; }
.ih-skill.reading { --c: var(--accent); }
.ih-skill.writing { --c: #c2410c; }
.ih-skill.speaking { --c: var(--teal); }
.ih-skill header { display: flex; align-items: center; gap: 10px; }
.ih-skill h3 { margin: 0; font-size: var(--fs-md); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.ih-skill h3 .en { font-size: var(--fs-xs); color: var(--ink-2); font-weight: 500; }
.ih-ic {
  inline-size: 34px; block-size: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--c);
}
.ih-ic .ic { inline-size: 18px; block-size: 18px; }
.ih-band { margin: 2px 0 0; font-size: var(--fs-2xl); font-weight: 700; letter-spacing: var(--ls-title); line-height: 1.15; }
.ih-band small { font-size: var(--fs-md); font-weight: 500; color: var(--ink-2); }
.ih-band-empty { font-size: var(--fs-md); font-weight: 600; color: var(--ink-2); }

/* the band track: a fixed 3..9 number line; the range is a filled segment, the target a thin tick */
.ih-track {
  position: relative; block-size: 10px; border-radius: 99px; margin-block-start: 6px;
  background: var(--fill-q);
}
.ih-skill.ih-empty .ih-track { background: repeating-linear-gradient(90deg, var(--fill-q) 0 6px, transparent 6px 10px); }
.ih-range {
  position: absolute; inset-block: 0; left: calc(var(--lo) * 100%); right: calc((1 - var(--hi)) * 100%);
  border-radius: 99px; min-inline-size: 10px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, transparent), var(--c));
}
.ih-goal {
  position: absolute; inset-block: -5px; left: calc(var(--at) * 100%); inline-size: 2px; margin-left: -1px;
  background: var(--ink); border-radius: 2px; opacity: 0.75;
}
.ih-scale { display: flex; justify-content: space-between; font-size: var(--fs-2xs); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ih-meta { margin: 2px 0 0; font-size: var(--fs-xs); }
.ih-go {
  justify-self: start; display: inline-flex; align-items: center; gap: 4px; margin-block-start: 2px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--accent-ink); text-decoration: none; min-block-size: 44px;
}
.ih-go .ic { inline-size: 16px; block-size: 16px; }
.ih-go:hover { text-decoration: underline; }

/* --- «برنامه‌ی تو»: the programme's weeks as one strip (phase hue as on the programme pages, plans.css) --- */
.ih-plan-card { gap: 12px; }
.ih-plan .ph-diagnose { --ph: var(--indigo); }
.ih-plan .ph-foundation { --ph: #0e8f86; }
.ih-plan .ph-build { --ph: var(--teal-deco); }
.ih-plan .ph-timed { --ph: var(--saffron); }
.ih-plan .ph-mock { --ph: #e0702b; }
.ih-plan .ph-review { --ph: #8a63d2; }
.ih-plan .ph-taper { --ph: var(--ok); }
.ih-plan .ph-none { --ph: var(--ink-2); }
/* weeks run in reading order (week 1 at the reading start), like the programme page */
.ih-weeks { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.ih-wk { display: grid; gap: 4px; justify-items: center; }
.ih-wk-bar { inline-size: 100%; block-size: 10px; border-radius: 99px; background: color-mix(in srgb, var(--ph) 22%, transparent); }
.ih-wk.done .ih-wk-bar { background: var(--ph); }
.ih-wk.now .ih-wk-bar { background: color-mix(in srgb, var(--ph) 55%, transparent); outline: 2px solid var(--ph); outline-offset: 2px; }
.ih-wk-n { font-size: var(--fs-2xs); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ih-wk.now .ih-wk-n { color: var(--ink); font-weight: 700; }
.ih-weeks-legend { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-2xs); }
.ih-weeks-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ih-weeks-legend i { inline-size: 8px; block-size: 8px; border-radius: 99px; background: var(--ph); }
.ih-fit {
  margin: 0; display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px;
  background: var(--fill-q); font-size: var(--fs-sm); line-height: var(--lh-body, 1.7);
}
.ih-fit .ic { inline-size: 16px; block-size: 16px; flex: none; margin-block-start: 4px; color: var(--accent-ink); }
.ih-fit.tight .ic, .ih-fit.final .ic { color: var(--saffron-ink, var(--accent-ink)); }
.ih-fit a { color: var(--accent-ink); font-weight: 600; }
.ih-plan-h { margin: 4px 0 0; font-size: var(--fs-base); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ih-plan-h small { font-weight: 500; font-size: var(--fs-xs); }
.ih-items { list-style: none; margin: 0; padding: 0; display: grid; }
.ih-items li { display: flex; gap: 10px; align-items: center; min-block-size: 48px; padding-block: 6px; border-block-end: 0.5px solid var(--sep); }
.ih-items li:last-child { border-block-end: 0; }
.ih-it-ic { inline-size: 30px; block-size: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--fill-q); color: var(--ink-2); }
.ih-it-ic .ic { inline-size: 16px; block-size: 16px; }
.ih-items li.done .ih-it-ic { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.ih-items li.next .ih-it-ic { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.ih-it-t { display: grid; gap: 1px; min-inline-size: 0; overflow-wrap: anywhere; }
.ih-it-t a { color: inherit; font-weight: 600; text-decoration: none; }
.ih-it-t a:hover { color: var(--accent-ink); text-decoration: underline; }
.ih-items li.done .ih-it-t { color: var(--ink-2); }
.ih-items li.next .ih-it-t a { color: var(--accent-ink); }
.ih-it-t small { font-size: var(--fs-xs); }
.ih-plan-stats { margin: 0; font-weight: 600; font-size: var(--fs-sm); }
.ih-actions form { display: contents; }

/* --- two-column cards --- */
.ih-cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.ih-card {
  background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card);
  padding: 18px; display: grid; gap: 8px; align-content: start;
}
.ih-card-t { margin: 0 0 2px; font-size: var(--fs-md); display: flex; align-items: center; gap: 8px; }
.ih-card-t .ic { inline-size: 18px; block-size: 18px; color: var(--accent-ink); }
.ih-card p { margin: 0; }
.ih-next-title { font-size: var(--fs-lg); font-weight: 700; line-height: var(--lh-title); }
.ih-plan-bar { margin-block: 6px 0; }
.ih-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 6px; }

.ih-weak-list { list-style: none; margin: 0; padding: 0; display: grid; }
.ih-weak-list li {
  display: grid; grid-template-columns: 1fr 64px auto; align-items: center; gap: 12px;
  padding-block: 10px; border-block-end: 0.5px solid var(--sep);
}
.ih-weak-list li:last-child { border-block-end: 0; }
.ih-weak-txt { display: grid; gap: 2px; min-inline-size: 0; }
.ih-weak-txt b { font-size: var(--fs-base); }
.ih-weak-txt small { font-size: var(--fs-xs); }
/* accuracy, not a verdict: one neutral bar (no red/green), filling from the reading start like every progress bar */
.ih-acc { block-size: 6px; border-radius: 99px; background: var(--fill-q); overflow: hidden; }
.ih-acc i { display: block; block-size: 100%; inline-size: calc(var(--p) * 100%); background: var(--ink-2); border-radius: inherit; }

.ih-mocks { list-style: none; margin: 0; padding: 0; display: grid; }
.ih-mocks a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; min-block-size: 44px;
  padding-block: 6px; border-block-end: 0.5px solid var(--sep); color: inherit; text-decoration: none;
}
.ih-mocks li:last-child a { border-block-end: 0; }
.ih-mocks a:hover span { color: var(--accent-ink); }

.ih-rev { list-style: none; margin: 0; padding: 0; display: grid; }
.ih-rev li { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-block-size: 44px; border-block-end: 0.5px solid var(--sep); }
.ih-rev li:last-child { border-block-end: 0; }

.ih-foot { text-align: center; margin: 4px 0 0; }

@media (max-width: 520px) {
  .ih-hero { padding: 18px 16px 14px; }
  .ih-weak-list li { grid-template-columns: 1fr auto; }
  .ih-acc { display: none; }
  /* phones: the four skills as a 2x2 grid that fits on one screen (the scale shows only its ends) */
  /* 10rem, not px: with large text (Android font size, browser zoom) the cards fall back to one column instead of overflowing */
  .ih-skills { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 10px; }
  .ih-skill { padding: 12px 12px 8px; gap: 6px; }
  .ih-skill h3 .en { display: none; }
  .ih-ic { inline-size: 28px; block-size: 28px; border-radius: 8px; }
  .ih-band { font-size: var(--fs-xl); }
  .ih-band-empty { font-size: var(--fs-sm); }
  .ih-scale span:not(:first-child):not(:last-child) { visibility: hidden; }
  .ih-meta { font-size: var(--fs-2xs); }
}

/* --- a visitor's free diagnostic (assessments/guest_tests.py) --- */
.ih-diag-done { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; font-size: var(--fs-sm); }
