/* Mansouri Immigration Tools
   Direction: a storybook dusk over the North Shore mountains. Serious structure,
   warm lantern light, one fairytale moment (the hero path). */

:root {
  --night: #1B1F45;      /* dusk indigo: headings, dark surfaces */
  --night-2: #2A2E63;
  --mist: #EDF1F6;       /* glacier mist: page background */
  --paper: #FBFCFE;      /* panels */
  --fir: #2E5B4F;        /* forest green: positive, success */
  --lantern: #F0B44C;    /* gold accent: actions, highlights */
  --lantern-soft: #FFE3A3;
  --rose: #B8435A;       /* warnings only */
  --maple: #D8343F;      /* Canada red: the maple leaf, used sparingly */
  --sky: #BFDDF4;
  --ink: #232744;
  --slate: #5B6180;
  --line: #D6DCE8;

  --display: "Fraunces", Georgia, serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.1rem;
  --step-4: clamp(2.5rem, 5.2vw, 4rem);

  --r-sm: 6px;
  --r-md: 14px;
  --r-lg: 22px;
  --wrap: 1180px;
}

html[lang="fa"] {
  --display: "Vazirmatn", Tahoma, sans-serif;
  --body: "Vazirmatn", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--mist);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--night-2); }
h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  color: var(--night);
  line-height: 1.12;
  margin: 0 0 .5em;
  font-weight: 600;
}
html[lang="fa"] h1, html[lang="fa"] h2, html[lang="fa"] h3 { font-weight: 800; line-height: 1.35; }
h1 { font-size: var(--step-4); letter-spacing: -0.015em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
[hidden] { display: none !important; }

.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--lantern); color: var(--night); padding: .6rem 1rem; z-index: 50; border-radius: 0 0 8px 8px; }
.skip:focus { top: 0; }
body { overflow-x: hidden; }
:focus-visible { outline: 3px solid var(--lantern); outline-offset: 2px; border-radius: 4px; }

/* ---------- Top bar ---------- */
.sticky-top { position: sticky; top: 0; z-index: 20; }
.topbar { background: var(--night); color: #fff; border-bottom: 4px solid var(--lantern); box-shadow: inset 0 -1px 0 rgba(255,255,255,.08); }
.test-banner { background: #C8102E; color: #fff; text-align: center; padding: .55rem 1rem; font-weight: 500; font-size: .95rem; line-height: 1.35; }
.test-banner strong { font-weight: 800; margin-inline-end: .35rem; }
.test-expired { max-width: 40rem; margin: 5rem auto; padding: 2rem; background: #fff; border: 3px solid #C8102E; border-radius: var(--r-md); text-align: center; }
.test-expired h1 { font-size: var(--step-3); color: #C8102E; }
.topbar-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { display: flex; align-items: baseline; gap: .55rem; color: #fff; text-decoration: none; margin-inline-end: auto; }
.brand-mark { width: 34px; height: 34px; align-self: center; flex: none; }
.brand-name { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 600; font-size: 1.2rem; }
.brand-sub { color: var(--lantern-soft); font-size: .95rem; }
.nav { display: flex; gap: 1.4rem; }
.nav a { color: #DCE0F5; text-decoration: none; font-weight: 500; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--lantern); }
.lang-toggle {
  font: inherit; font-weight: 600; color: var(--night); background: var(--lantern-soft);
  border: 0; border-radius: 999px; padding: .4rem .95rem; cursor: pointer;
}
.lang-toggle .lang-on-en { font-family: "Vazirmatn", sans-serif; }
.lang-toggle .lang-on-fa { font-family: "Figtree", sans-serif; }
html[lang="en"] .lang-on-fa, html[lang="fa"] .lang-on-en { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border-radius: 999px; padding: .85rem 1.5rem; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-lantern { background: var(--lantern); color: var(--night); box-shadow: 0 0 0 0 rgba(240,180,76,.0); }
.btn-lantern:hover { transform: translateY(-1px); box-shadow: 0 6px 24px -6px rgba(240,180,76,.75); }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-primary { background: var(--night); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(27,31,69,.6); }
.hero .btn-ghost { color: var(--night); border-color: rgba(27,31,69,.45); background: rgba(255,255,255,.35); }
.hero .btn-ghost:hover { border-color: var(--night); background: rgba(255,255,255,.6); }

/* ---------- Hero ---------- */
.hero { position: relative; background: #BFDDF4; color: var(--ink); overflow: hidden; min-height: clamp(520px, 78vh, 700px); display: flex; }
.hero-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: relative; z-index: 1; padding-top: clamp(3rem, 9vh, 6.5rem); padding-bottom: 14rem; width: 100%; }
.hero h1 { color: var(--night); max-width: 13ch; font-weight: 600; }
.hero-lede { font-size: var(--step-1); color: #2C3561; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 1rem; }
.hero-note { color: #3F4A75; font-size: var(--step--1); }

/* the one orchestrated moment: the trail draws itself to the lantern */
.path-mask { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: trail 2.6s .3s cubic-bezier(.5,.1,.3,1) forwards; }
.lantern-glow { opacity: 0; transform-origin: 1010px 474px; animation: glow 1.4s 2.5s ease-out forwards; }
.lantern-star { opacity: 0; animation: fadein .6s 2.6s ease-out forwards; }
.twinkle { transform-box: fill-box; transform-origin: center; animation: twinkle 4.8s 3.2s ease-in-out 2; }
.twinkle.t2 { animation-delay: 3.8s; }
.twinkle.t3 { animation-delay: 4.4s; }
@keyframes trail { to { stroke-dashoffset: 0; } }
@keyframes glow { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes fadein { to { opacity: 1; } }
@keyframes twinkle { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.5); opacity: .5; } }
html[dir="rtl"] .hero-scene { transform: scaleX(-1); }

@media (prefers-reduced-motion: reduce) {
  .path-mask { animation: none; stroke-dashoffset: 0; }
  .lantern-glow, .lantern-star { animation: none; opacity: 1; }
  .twinkle { animation: none; }
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- Home ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(2rem, 5vw, 4.5rem); padding-top: 3.5rem; padding-bottom: 4rem; }
.toolshelf > h2 { margin-bottom: 1.2rem; }
.shelf-group + .shelf-group { margin-top: 2rem; }
.shelf-group h3 { font-size: var(--step-0); font-family: var(--body); font-variation-settings: normal; color: var(--slate); font-weight: 600; margin-bottom: .6rem; }
.shelf { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.shelf li { border-bottom: 1px solid var(--line); }
.shelf-item { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 1rem; padding: 1.05rem .25rem; color: inherit; text-decoration: none; }
a.shelf-item:hover .shelf-text strong { color: var(--night-2); text-decoration: underline; text-decoration-color: var(--lantern); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.shelf-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--night); color: var(--lantern); }
.shelf-icon svg { width: 26px; height: 26px; }
.is-soon .shelf-icon { background: #DDE2EE; color: var(--slate); }
.shelf-text { display: flex; flex-direction: column; gap: .1rem; }
.shelf-text strong { font-size: var(--step-1); font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 600; color: var(--night); }
html[lang="fa"] .shelf-text strong { font-weight: 700; }
.shelf-text span { color: var(--slate); }
.is-soon .shelf-text strong { color: #4A5072; }
.tag { font-size: var(--step--1); font-weight: 600; color: var(--slate); background: #E2E7F1; border-radius: 999px; padding: .2rem .7rem; white-space: nowrap; }
.tag-live { background: #DCEFE7; color: var(--fir); }

.latest { background: var(--paper); border-radius: var(--r-lg); padding: 1.6rem; align-self: start; border: 1px solid var(--line); }
.latest h2 { font-size: var(--step-2); }
.latest-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.latest-list li { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: .8rem 0; border-bottom: 1px dashed var(--line); }
.latest-list .l-name { font-weight: 600; }
.latest-list .l-date { color: var(--slate); font-size: var(--step--1); grid-column: 1; }
.latest-list .l-crs { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-size: var(--step-2); font-weight: 600; color: var(--night); }
.text-link { font-weight: 600; text-decoration-color: var(--lantern); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- Page head (tool pages) ---------- */
.page-head { position: relative; background: linear-gradient(180deg, #8FC3EC 0%, #C4E0F5 55%, #FCE6CF 100%); color: #2C3561; padding: 2.8rem 0 5rem; }
.page-head h1 { color: var(--night); font-size: var(--step-3); }
.page-head p { font-size: var(--step-1); margin: 0; }
.head-ridge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 70px; }

/* ---------- CRS ---------- */
.crs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(1.5rem, 4vw, 3.5rem); padding-top: 1rem; padding-bottom: 4rem; align-items: start; }
.step { border: 0; margin: 0 0 1.4rem; padding: 1.6rem; background: var(--paper); border-radius: var(--r-md); border: 1px solid var(--line); }
.step legend { display: flex; align-items: center; gap: .75rem; padding: 0; float: left; width: 100%; margin-bottom: 1.1rem; font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-size: var(--step-2); font-weight: 600; color: var(--night); }
html[dir="rtl"] .step legend { float: right; }
html[lang="fa"] .step legend { font-weight: 800; }
.step legend ~ * { clear: both; }
.step { display: flow-root; }
.step-n { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--lantern-soft); color: var(--night); font-family: var(--body); font-size: 1rem; font-weight: 700; flex: none; }
.field { margin-bottom: 1.2rem; }
.field:last-child { margin-bottom: 0; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: .45rem; }
.field-short select, .field-short input { max-width: 16rem; }
input[type="number"], input[type="text"], input[type="email"], input[type="tel"], input[type="month"], input:not([type]), select {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid #C6CDDD; border-radius: var(--r-sm); padding: .7rem .8rem; min-height: 48px;
}
input:focus, select:focus { border-color: var(--night-2); outline: 3px solid rgba(240,180,76,.55); outline-offset: 0; }
.hint { color: var(--slate); font-size: var(--step--1); margin: .45rem 0 0; }
.hint.good { color: var(--fir); font-weight: 600; }

.segmented { display: inline-flex; flex-wrap: wrap; gap: .4rem; background: #E6EAF3; padding: .3rem; border-radius: 999px; }
.segmented label { margin: 0; font-weight: 500; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-block; padding: .5rem 1.1rem; border-radius: 999px; cursor: pointer; }
.segmented input:checked + span { background: var(--night); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid var(--lantern); outline-offset: 2px; }

.lang-block + .lang-block { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px dashed var(--line); }
.ability-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.ability-grid:empty { display: none; }
.ability-grid label { font-weight: 500; font-size: var(--step--1); color: var(--slate); margin-bottom: .3rem; display: block; }
.ability-grid .clb { font-size: .8rem; color: var(--fir); font-weight: 600; margin-top: .25rem; min-height: 1.2em; }

.checks { display: grid; gap: .8rem; }
.check { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; accent-color: var(--night); flex: none; }

/* score panel */
.score-panel { position: sticky; top: 130px; display: grid; gap: 1rem; }
.lantern-card {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 1.6rem 1.6rem 1.3rem;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(240,180,76,.28), transparent 55%),
    linear-gradient(170deg, var(--night) 0%, var(--night-2) 100%);
  color: #E3E5F7;
}
.lantern-card h2 { color: #FFF6E4; font-size: var(--step-1); margin-bottom: .2rem; }
.score-big { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 1rem; }
.score-big output { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-size: clamp(3.6rem, 7vw, 4.6rem); line-height: 1; font-weight: 600; color: var(--lantern-soft); text-shadow: 0 0 28px rgba(240,180,76,.45); font-variant-numeric: tabular-nums; }
html[lang="fa"] .score-big output { font-weight: 800; }
.score-of { color: #B9BEE0; font-size: var(--step--1); }
.breakdown { margin: 0; display: grid; gap: .55rem; }
.breakdown div { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; }
.breakdown dt { font-size: var(--step--1); color: #D7DAF2; }
.breakdown dd { margin: 0; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.breakdown .bar { grid-column: 1 / -1; height: 5px; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; }
.breakdown .bar i { display: block; height: 100%; background: var(--lantern); border-radius: 99px; transition: width .35s ease; }
html[dir="rtl"] .breakdown .bar i { margin-inline-start: 0; }

.panel-block { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.3rem 1.4rem; }
.panel-block h3 { font-size: var(--step-1); }
.vs-list, .raise-list { list-style: none; margin: 0 0 .6rem; padding: 0; }
.vs-list li { display: grid; grid-template-columns: 1fr auto; gap: .1rem .8rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); }
.vs-list .v-name { font-weight: 600; font-size: .95rem; }
.vs-list .v-meta { color: var(--slate); font-size: .8rem; }
.vs-list .v-diff { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-weight: 700; font-size: .9rem; border-radius: 999px; padding: .2rem .65rem; white-space: nowrap; }
.v-diff.above { background: #DCEFE7; color: var(--fir); }
.v-diff.below { background: #F3E3E7; color: var(--rose); }
.raise-list li { display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.raise-list .r-gain { grid-row: 1 / span 2; font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 600; font-size: var(--step-1); color: var(--fir); min-width: 3.4rem; }
.raise-list .r-what { font-weight: 600; font-size: .95rem; }
.raise-list .r-effort { color: var(--slate); font-size: .8rem; }
.fine { color: var(--slate); font-size: .8rem; margin: 0; }
.fine.warn { color: var(--rose); font-weight: 600; margin-top: .6rem; }

.mobile-score { display: none; }

/* ---------- Draws ---------- */
.draws-layout { padding-top: 1rem; padding-bottom: 4rem; }
.draws-controls { display: grid; grid-template-columns: auto minmax(0, 22rem) auto 9rem; gap: .6rem 1rem; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 1.2rem; margin-bottom: 1.2rem; }
.draws-controls label { font-weight: 600; }
.draw-chart { margin: 0 0 1.4rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.2rem 1.2rem .8rem; }
.draw-chart svg { width: 100%; height: 260px; }
.draw-chart .c-line { fill: none; stroke: var(--night-2); stroke-width: 2.5; stroke-linejoin: round; }
.draw-chart .c-dot { fill: var(--lantern); stroke: var(--night); stroke-width: 1.5; }
.draw-chart .c-grid { stroke: var(--line); stroke-width: 1; }
.draw-chart .c-label { fill: var(--slate); font-size: 12px; font-family: var(--body); }
.draw-chart .c-mine { stroke: var(--fir); stroke-width: 2; stroke-dasharray: 6 5; }
.draw-chart .c-mine-label { fill: var(--fir); font-weight: 700; font-size: 12px; font-family: var(--body); }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); }
.draws-table { width: 100%; border-collapse: collapse; }
.draws-table th, .draws-table td { padding: .75rem 1rem; text-align: start; border-bottom: 1px solid var(--line); }
.draws-table th { font-size: var(--step--1); color: var(--slate); font-weight: 600; background: #F3F6FA; }
.draws-table .num { text-align: end; font-variant-numeric: tabular-nums; }
.draws-table td.num strong { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-size: 1.15rem; color: var(--night); }
.draws-table tr.is-reachable td { background: #F0F8F4; }
.draws-table .reach { display: inline-block; margin-inline-start: .5rem; color: var(--fir); font-size: .78rem; font-weight: 700; }
#drawsSource { margin-top: .8rem; }

/* ---------- Team (the Mansouri touch: a Persian eight-point star pattern) ---------- */
.team {
  background-color: #FFFFFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%231B1F45' stroke-opacity='.055' stroke-width='1.4'%3E%3Crect x='16' y='16' width='24' height='24'/%3E%3Crect x='16' y='16' width='24' height='24' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
  border-top: 1px solid var(--line);
}
.team-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); padding-top: 3.5rem; padding-bottom: 3.5rem; align-items: center; }
.team-copy p { font-size: var(--step-1); color: #3A4166; }
.team-facts { margin: 0; display: grid; gap: 1rem; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem 1.6rem; }
.team-facts div { display: grid; gap: .1rem; padding-bottom: 1rem; border-bottom: 1px dashed var(--line); }
.team-facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.team-facts dt { color: var(--maple); font-weight: 700; font-size: var(--step--1); }
.team-facts dd { margin: 0; font-weight: 600; color: var(--night); }

/* ---------- Consult ---------- */
.consult { background: linear-gradient(160deg, var(--night) 0%, #24427A 100%); color: #E3E5F7; }
.consult-inner { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2.5rem; align-items: center; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.consult h2 { color: #FFF6E4; font-size: var(--step-3); max-width: 22ch; }
.consult p { color: #D3D6EE; max-width: 60ch; }
html[dir="rtl"] .consult-scene { transform: scaleX(-1); }

/* ---------- Footer ---------- */
.footer { background: #14173A; color: #AEB3D6; font-size: var(--step--1); }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 2rem; padding-top: 2rem; padding-bottom: 2rem; }
.footer p { margin: 0 0 .3rem; }
.footer-firm { color: #fff; font-weight: 600; }
.footer a { color: var(--lantern-soft); }
.disclaimer { max-width: 62ch; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .home-grid, .crs-layout, .team-inner { grid-template-columns: 1fr; }
  .score-panel { position: static; }
  .footer-inner { grid-template-columns: 1fr; gap: 1rem; }
  .mobile-score {
    display: flex; position: fixed; inset-inline: 1rem; bottom: 1rem; z-index: 15;
    justify-content: space-between; align-items: center; padding: .7rem 1.2rem;
    background: var(--night); color: #E3E5F7; border-radius: 999px; box-shadow: 0 10px 30px -10px rgba(27,31,69,.6);
  }
  .mobile-score strong { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-size: 1.6rem; color: var(--lantern-soft); }
  .mobile-score.is-hidden { display: none; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .brand-sub { display: none; }
  .hero-copy { padding-bottom: 11rem; }
  .hero-scene .geese, .hero-scene .clouds { display: none; }
  html[lang="fa"] .brand-name { font-size: 1rem; white-space: nowrap; }
  .ability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf-item { grid-template-columns: 40px 1fr; }
  .shelf-icon { width: 40px; height: 40px; }
  .shelf-item .tag { grid-column: 2; justify-self: start; }
  .draws-controls { grid-template-columns: 1fr; }
  .consult-inner { grid-template-columns: 1fr; }
  .consult-scene { width: 140px; }
  .step { padding: 1.2rem; }
}

/* ---------- Generic tool pages ---------- */
.crumbs { margin: 0 0 .6rem; font-size: var(--step--1); }
.crumbs a { color: var(--night-2); font-weight: 600; text-decoration-color: var(--lantern); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.checked-note { margin-top: .6rem !important; font-size: var(--step--1) !important; color: #3F4A75; }
.sec-intro { margin: -.4rem 0 1rem; }
.verdict h3 { margin-bottom: .3rem; }
.verdict p { margin: 0; }
.verdict.is-pass { background: #E6F4EC; border-color: #B9DFC8; }
.verdict.is-pass h3 { color: var(--fir); }
.verdict.is-short { background: #FBEFF1; border-color: #EBC7CF; }
.verdict.is-short h3 { color: var(--rose); }
.issue-list { margin: 0; padding-inline-start: 1.1rem; color: var(--rose); font-weight: 500; }
.issue-list li + li { margin-top: .35rem; }
.tool-sources { padding-bottom: 3.5rem; }
.tool-sources h2 { font-size: var(--step-1); }
.tool-sources ul { margin: 0 0 .8rem; padding-inline-start: 1.1rem; }
.tool-sources li + li { margin-top: .3rem; }
.simple-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.4rem 1.6rem; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: .65rem .9rem; text-align: start; border-bottom: 1px solid var(--line); }
.data-table th { font-size: var(--step--1); color: var(--slate); font-weight: 600; background: #F3F6FA; }
.data-table .num { text-align: end; font-variant-numeric: tabular-nums; }
.data-table tr.is-mine td { background: #FFF6DE; font-weight: 700; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { border-bottom: 1px dashed var(--line); }
.checklist label { display: flex; gap: .75rem; align-items: flex-start; padding: .7rem 0; cursor: pointer; }
.checklist input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--fir); flex: none; }
.checklist input:checked + span { color: var(--slate); text-decoration: line-through; text-decoration-color: var(--fir); }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.tabs button { font: inherit; font-weight: 600; border: 1.5px solid #C6CDDD; background: #fff; color: var(--night); border-radius: 999px; padding: .5rem 1rem; cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--night); border-color: var(--night); color: #fff; }
.progress-line { height: 8px; border-radius: 99px; background: #E2E7F1; overflow: hidden; margin: .4rem 0 1rem; }
.progress-line i { display: block; height: 100%; background: var(--fir); transition: width .3s ease; }
.money { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 600; color: var(--night); }
.stepper { display: inline-flex; align-items: center; gap: .4rem; }
.stepper button { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1.5px solid #C6CDDD; background: #fff; font: inherit; font-weight: 700; cursor: pointer; color: var(--night); }
.stepper output { min-width: 1.6rem; text-align: center; font-weight: 700; }
.fee-row { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem 1rem; align-items: center; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.fee-row .fee-each { color: var(--slate); font-size: var(--step--1); }
.field .check { display: flex; font-weight: 500; margin-bottom: 0; }

/* ---------- Unlock gate ---------- */
.is-locked > *:not(.unlock-card) { filter: blur(7px); pointer-events: none; user-select: none; }
.unlock-card { position: relative; z-index: 2; background: #fff; border: 2px solid var(--lantern); border-radius: var(--r-lg); padding: 1.3rem 1.4rem; box-shadow: 0 18px 40px -18px rgba(27,31,69,.45); text-align: center; }
.unlock-card .unlock-title { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-size: var(--step-1); font-weight: 700; color: var(--night); margin: 0 auto .3rem; }
.unlock-card .unlock-body { color: var(--slate); font-size: .95rem; margin: 0 auto 1rem; }
.unlock-card .btn { width: 100%; }
.unlock-inline { margin-top: 1rem; padding: 1rem 1.2rem; border: 2px dashed var(--lantern); border-radius: var(--r-md); display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; }
.unlock-inline p { margin: 0; font-weight: 600; }
body.modal-open { overflow: hidden; }
.gate-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(20,23,58,.55); display: grid; place-items: center; padding: 1rem; overflow-y: auto; }
.gate { position: relative; width: min(560px, 100%); background: var(--paper); border-radius: var(--r-lg); padding: 1.8rem 1.8rem 1.4rem; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); max-height: calc(100vh - 2rem); overflow-y: auto; }
.gate h2 { font-size: var(--step-2); margin-bottom: .3rem; }
.gate-lede { color: var(--slate); }
.gate-x { position: absolute; top: .7rem; inset-inline-end: .8rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: #E6EAF3; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--night); }
.gate input:not([type="checkbox"]) { width: 100%; }
.gate-checks { display: grid; gap: .7rem; margin: .4rem 0 1rem; }
.gate-checks .check span { font-size: .9rem; line-height: 1.45; }
.gate-error { color: var(--rose); font-weight: 600; margin: 0 0 .8rem; }
.gate-submit { width: 100%; }
.gate-privacy { margin-top: .8rem; text-align: center; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 70; background: var(--night); color: #fff; padding: .8rem 1.2rem; border-radius: 999px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); font-weight: 600; max-width: calc(100vw - 2rem); }
.prose { padding-top: 1rem; padding-bottom: 3rem; max-width: 760px; }
.prose h2 { font-size: var(--step-2); margin-top: 1.6rem; }

/* ---------- Showcase: everything in one place ---------- */
.play-ico { width: 1.25em; height: 1.25em; flex: none; }
html[dir="rtl"] .play-ico { transform: scaleX(-1); }
.showcase { background: #fff; border-bottom: 1px solid var(--line); }
.showcase-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.showcase h2 { font-size: var(--step-3); max-width: 16ch; }
.sc-lede { font-size: var(--step-1); color: #3A4166; }
.cap { margin-top: 1.2rem; }
.cap h3 { font-family: var(--body); font-variation-settings: normal; font-size: var(--step--1); color: var(--maple); font-weight: 700; margin-bottom: .5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }

.showcase-map { margin: 0; background: linear-gradient(180deg, #EAF4FC 0%, #FDF1E2 100%); border-radius: var(--r-lg); padding: 1.2rem 1.2rem 1.4rem; text-align: center; }
#capMap svg { width: 100%; height: auto; display: block; }
.showcase-map figcaption { color: var(--slate); font-size: var(--step--1); margin: .4rem 0 1rem; }
.tile { stroke: #fff; stroke-width: 3; transition: transform .15s ease; }
.tile-off { fill: #DCE3EF; }
.tile-live { fill: var(--lantern); }
.showcase-map a:hover .tile-live, .showcase-map a:focus .tile-live { fill: #F5C467; }
.tile-leaf { fill: var(--maple); }
.tile-label { font: 700 18px var(--body); fill: #7A819F; pointer-events: none; }
.tile-label.on { fill: var(--night); }
html[lang="fa"] .tile-label { font-family: "Figtree", sans-serif; }

/* ---------- Tour player ---------- */
.tour-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(20,23,58,.7); display: grid; place-items: center; padding: 1rem; }
.tour { position: relative; width: min(1040px, 100%); background: var(--night); border-radius: var(--r-lg); padding: .8rem .8rem .6rem; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); }
.tour-x { z-index: 3; top: 1.2rem; inset-inline-end: 1.2rem; background: rgba(255,255,255,.85); }
.tour-screen { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; background: #CFE6F7; }
.tour-stage { width: 100%; height: 100%; display: block; }
.tour-caption { position: absolute; left: 5%; right: 5%; bottom: 5%; margin: 0; max-width: none; background: rgba(255,255,255,.94); color: var(--night); border-radius: 16px; padding: .6em 1em; text-align: center; font-weight: 700; font-size: clamp(.95rem, 2.1vw, 1.45rem); line-height: 1.35; box-shadow: 0 8px 24px -12px rgba(27,31,69,.5); }
.tour-progress { position: absolute; top: 3.5%; left: 4%; right: 4%; display: flex; gap: 6px; }
html[dir="rtl"] .tour-progress { flex-direction: row-reverse; }
.tour-progress span { flex: 1; height: 5px; border-radius: 99px; background: rgba(27,31,69,.18); overflow: hidden; }
.tour-progress i { display: block; height: 100%; width: 0; background: var(--night); }
.tour-progress .done i { width: 100%; }
.tour-progress .now i { animation: tourprog var(--dur, 5600ms) linear forwards; }
.tour-screen.paused .now i { animation-play-state: paused; }
@keyframes tourprog { to { width: 100%; } }
.tour-end { position: absolute; top: 14%; inset-inline-start: 5%; display: none; flex-direction: column; gap: .6rem; align-items: flex-start; }
.tour-screen.at-end .tour-end { display: flex; animation: fadein .6s 1.6s both; }
.btn-ghost-dark { background: rgba(255,255,255,.8); color: var(--night); border-color: rgba(27,31,69,.35); }
.tour-controls { display: flex; justify-content: center; gap: .6rem; padding-top: .6rem; }
.tour-controls button { font: inherit; font-weight: 700; color: #fff; background: rgba(255,255,255,.12); border: 0; border-radius: 999px; padding: .45rem 1.1rem; cursor: pointer; }
.tour-controls .tour-play { background: var(--lantern); color: var(--night); min-width: 6rem; }

/* scenes */
.tour-stage .sc { opacity: 0; transition: opacity .5s ease; }
.tour-stage[data-scene="2"] .sc2, .tour-stage[data-scene="3"] .sc3, .tour-stage[data-scene="4"] .sc4, .tour-stage[data-scene="5"] .sc5,
.tour-stage[data-scene="6"] .sc6, .tour-stage[data-scene="7"] .sc7, .tour-stage[data-scene="8"] .sc8 { opacity: 1; }
.tour-stage .guide { transform: translate(90px, 230px) scale(1.25); transition: transform 1.1s cubic-bezier(.45,.05,.3,1); }
.tour-stage[data-scene="1"] .guide { transform: translate(330px, 150px) scale(1.75); }
.tour-stage[data-scene="4"] .guide { transform: translate(80px, 250px) scale(1.15); }
.tour-stage[data-scene="8"] .guide { transform: translate(70px, 236px) scale(1.35); }
.guide-bob { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.goose-art .wing { transform-box: fill-box; transform-origin: 20% 60%; }
.tour-stage.run[data-scene="1"] .wing, .tour-stage.run[data-scene="8"] .wing, .tour-stage.run[data-scene="4"] .wing { animation: flap .42s ease-in-out 6 alternate; }
@keyframes flap { from { transform: rotate(0); } to { transform: rotate(-38deg); } }
.hero-goose .wing { animation: flap .45s ease-in-out 4 alternate; animation-delay: 3s; }
.gauge-fill { stroke-dasharray: 100; stroke-dashoffset: 100; }
.tour-stage.run[data-scene="2"] .gauge-fill { animation: gauge 1.8s .2s ease-out forwards; }
@keyframes gauge { to { stroke-dashoffset: 28; } }
.needle { transform: rotate(-90deg); transform-origin: 0 0; }
.tour-stage.run[data-scene="2"] .needle { animation: needle 1.8s .2s ease-out forwards; }
@keyframes needle { to { transform: rotate(40deg); } }
.gauge-num { font: 600 64px "Fraunces", serif; font-variation-settings: "SOFT" 100, "WONK" 1; fill: var(--night); }
.tour-stage .pop { opacity: 0; scale: .6; transform-box: fill-box; transform-origin: center; }
.tour-stage.run .sc .pop { animation: pop .55s var(--d, .2s) cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes pop { to { opacity: 1; scale: 1; } }
.chart-line, .tick { stroke-dasharray: 100; stroke-dashoffset: 100; }
.tour-stage.run[data-scene="5"] .chart-line { animation: draw 2.2s .3s ease-out forwards; }
.tour-stage.run[data-scene="6"] .tick { animation: draw .45s var(--d) ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sc4 .tile-live { fill: #C9D3E8; }
.sc4 .tile-leaf { opacity: 0; }
.tour-stage.run[data-scene="4"] .sc4 .tile-live { animation: tileon .5s calc(.3s + var(--i) * .22s) forwards; }
.tour-stage.run[data-scene="4"] .sc4 .tile-leaf { animation: fadein .4s calc(.5s + var(--i) * .22s) forwards; }
@keyframes tileon { to { fill: #F0B44C; } }
.coin { font: 800 52px "Figtree", sans-serif; fill: #fff; }
.bubble-en { font: 600 44px "Fraunces", serif; font-variation-settings: "SOFT" 100, "WONK" 1; fill: var(--night); }
.bubble-fa { font: 800 44px "Vazirmatn", sans-serif; fill: #fff; }
.trail8 { opacity: 0; }
.tour-stage.run[data-scene="8"] .trail8 { animation: fadein 1s .2s forwards; }

/* recording mode (used to export the MP4) */
.tour-backdrop.recording { padding: 0; background: #000; }
.recording .tour { width: 100vw; height: 100vh; padding: 0; border-radius: 0; }
.recording .tour-screen { border-radius: 0; height: 100%; aspect-ratio: auto; }
.recording .tour-controls, .recording .tour-x, .recording .tour-end { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .guide-bob, .tour-stage .wing, .hero-goose .wing { animation: none !important; }
  .tour-stage .guide { transition: none; }
}
@media (max-width: 960px) {
  .showcase-inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .tour-caption { font-size: .85rem; bottom: 3%; padding: .45em .7em; }
  .tour-end { top: 10%; }
  .tour-end .btn { padding: .5rem 1rem; font-size: .85rem; }
}

/* ---------- Tour cast animations ---------- */
.tour-stage .ch-in { opacity: 0; translate: 0 80px; }
.tour-stage.run[data-scene="1"] .sc1 .ch-in, .tour-stage.run[data-scene="2"] .sc2 .ch-in, .tour-stage.run[data-scene="3"] .sc3 .ch-in,
.tour-stage.run[data-scene="5"] .sc5 .ch-in, .tour-stage.run[data-scene="6"] .sc6 .ch-in, .tour-stage.run[data-scene="7"] .sc7 .ch-in,
.tour-stage.run[data-scene="8"] .sc8 .ch-in { animation: hopin .8s .1s cubic-bezier(.3,1.6,.5,1) forwards; }
.tour-stage.run[data-scene="7"] .sc7 .ch-cat { animation-delay: .3s; }
.tour-stage.run[data-scene="8"] .sc8 g:nth-of-type(2) .ch-in { animation-delay: .15s; }
.tour-stage.run[data-scene="8"] .sc8 g:nth-of-type(3) .ch-in { animation-delay: .3s; }
.tour-stage.run[data-scene="8"] .sc8 g:nth-of-type(4) .ch-in { animation-delay: .45s; }
.tour-stage.run[data-scene="8"] .sc8 g:nth-of-type(5) .ch-in { animation-delay: .6s; }
.tour-stage.run[data-scene="8"] .sc8 g:nth-of-type(6) .ch-in { animation-delay: .75s; }
@keyframes hopin { 0% { opacity: 0; translate: 0 80px; } 60% { opacity: 1; translate: 0 -14px; } 100% { opacity: 1; translate: 0 0; } }
.tour-stage .ch-idle, .hero-goose .ch-goose { animation: idle 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes idle { 0%,100% { scale: 1 1; } 50% { scale: 1.02 .975; } }
.tour-stage.run[data-scene="8"] .sc8 .ch-idle { animation: jump .7s ease-in-out infinite; animation-delay: 1.4s; }
@keyframes jump { 0%,100% { translate: 0 0; } 40% { translate: 0 -26px; } 60% { translate: 0 -26px; } }
.blink { transform-box: fill-box; transform-origin: center; animation: blink 4.2s infinite; }
@keyframes blink { 0%,93%,100% { scale: 1 1; } 96% { scale: 1 .1; } }
.ch-beaver .tail { transform-box: fill-box; transform-origin: 90% 50%; animation: slap 1s ease-in-out infinite; }
@keyframes slap { 0%,100% { rotate: 0deg; } 50% { rotate: 12deg; } }
.ch-beaver .arm, .ch-goose .wing { transform-box: fill-box; transform-origin: 20% 80%; animation: wave .5s ease-in-out infinite alternate; }
@keyframes wave { from { rotate: 0deg; } to { rotate: -28deg; } }
.ch-moose .antlers { transform-box: fill-box; transform-origin: 50% 100%; animation: wiggle 1.6s ease-in-out infinite; }
@keyframes wiggle { 0%,100% { rotate: -4deg; } 50% { rotate: 4deg; } }
.ch-bear .arm { transform-box: fill-box; transform-origin: 0% 100%; animation: point 1.2s ease-in-out infinite; }
@keyframes point { 0%,100% { rotate: 0deg; } 50% { rotate: -10deg; } }
.ch-raccoon .tail, .ch-cat .tail { transform-box: fill-box; transform-origin: 90% 90%; animation: swish 1.4s ease-in-out infinite; }
@keyframes swish { 0%,100% { rotate: -8deg; } 50% { rotate: 8deg; } }
.ch-loon .float { animation: float 2.4s ease-in-out infinite; }
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 6px; } }
.flyer { translate: -320px 330px; }
.tour-stage.run[data-scene="4"] .flyer { animation: fly 5.2s cubic-bezier(.35,.1,.4,1) forwards; }
@keyframes fly { 0% { translate: -320px 330px; } 35% { translate: 160px 180px; } 70% { translate: 560px 40px; } 100% { translate: 1000px -40px; } }
.ch-fly .wing { transform-box: fill-box; transform-origin: 80% 95%; animation: flapfast .28s ease-in-out infinite alternate; }
.ch-fly .wing-back { animation-delay: .06s; }
@keyframes flapfast { from { rotate: 0deg; scale: 1 1; } to { rotate: 18deg; scale: 1 .55; } }
.ch-fly .scarf-tail, .ch-goose .scarf-tail { transform-box: fill-box; transform-origin: 100% 0%; animation: flutter .35s ease-in-out infinite alternate; }
@keyframes flutter { from { rotate: -6deg; } to { rotate: 8deg; } }
.confetti { opacity: 0; transform-box: fill-box; transform-origin: center; }
.tour-stage.run[data-scene="8"] .confetti { animation: fall var(--dur) var(--d) linear forwards; }
@keyframes fall { 0% { opacity: 1; translate: 0 0; rotate: 0deg; } 100% { opacity: 1; translate: 30px 620px; rotate: var(--r); } }
.sparkle { animation-timing-function: cubic-bezier(.3,1.8,.5,1); }
.tour-stage.run .sc .sparkle { animation: pop .55s var(--d) cubic-bezier(.3,1.8,.5,1) forwards, twinkle2 1.6s calc(var(--d) + .6s) ease-in-out infinite; }
@keyframes twinkle2 { 0%,100% { scale: 1; } 50% { scale: .6; } }
.clouds-drift { animation: drift 30s linear infinite alternate; }
@keyframes drift { from { translate: 0 0; } to { translate: 60px 0; } }
.bubble-hi { font: 600 48px "Fraunces", serif; font-variation-settings: "SOFT" 100, "WONK" 1; fill: var(--night); }
.leaf-big { transform-box: fill-box; transform-origin: center; }
.tour-stage.run[data-scene="8"] .leaf-big { animation: pop .6s .4s cubic-bezier(.3,1.6,.5,1) forwards, spinleaf 3s 1.2s ease-in-out infinite; }
@keyframes spinleaf { 0%,100% { rotate: -6deg; } 50% { rotate: 6deg; } }
@media (prefers-reduced-motion: reduce) {
  .tour-stage .ch-in { opacity: 1; translate: 0 0; animation: none !important; }
  .ch-idle, .blink, .tail, .arm, .wing, .antlers, .float, .clouds-drift, .confetti, .scarf-tail { animation: none !important; }
  .flyer { translate: 300px 120px; }
}

/* ---------- Faster, livelier tour (4-second scenes) ---------- */
.tour-stage[data-scene="1"] .sc1 { opacity: 1; }
.tour-stage .sc { transition: opacity .25s ease; }
.kinetic { opacity: 0; font: 700 64px "Fraunces", serif; font-variation-settings: "SOFT" 100, "WONK" 1; fill: #fff; stroke: #1B1F45; stroke-width: 10px; paint-order: stroke; stroke-linejoin: round; transform-box: fill-box; transform-origin: 0% 100%; }
html[lang="fa"] .kinetic { font-family: "Vazirmatn", sans-serif; font-weight: 800; }
.tour-stage.run[data-scene="1"] .k1, .tour-stage.run[data-scene="2"] .k2, .tour-stage.run[data-scene="3"] .k3, .tour-stage.run[data-scene="4"] .k4,
.tour-stage.run[data-scene="5"] .k5, .tour-stage.run[data-scene="6"] .k6, .tour-stage.run[data-scene="7"] .k7 { animation: slam .5s .15s cubic-bezier(.3,1.7,.5,1) forwards; }
@keyframes slam { 0% { opacity: 0; scale: 2.2; rotate: -8deg; } 100% { opacity: 1; scale: 1; rotate: -3deg; } }
.wipe { translate: 0 0; }
.tour-stage.run .wipe { animation: wipe .5s cubic-bezier(.6,0,.3,1) forwards; }
.tour-stage.run[data-scene="1"] .wipe { animation: none; }
@keyframes wipe { 0% { translate: 0 0; } 45% { translate: 1050px 0; } 100% { translate: 2200px 0; } }
.tour-stage.run[data-scene="1"] .sc1 .ch-in, .tour-stage.run[data-scene="2"] .sc2 .ch-in, .tour-stage.run[data-scene="3"] .sc3 .ch-in,
.tour-stage.run[data-scene="5"] .sc5 .ch-in, .tour-stage.run[data-scene="6"] .sc6 .ch-in, .tour-stage.run[data-scene="7"] .sc7 .ch-in,
.tour-stage.run[data-scene="8"] .sc8 .ch-in { animation-duration: .6s; animation-delay: .2s; }
.tour-stage.run[data-scene="2"] .gauge-fill, .tour-stage.run[data-scene="2"] .needle { animation-duration: 1.3s; animation-delay: .3s; }
.tour-stage.run[data-scene="5"] .chart-line { animation-duration: 1.5s; }
.tour-stage.run[data-scene="4"] .flyer { animation-duration: 3.8s; }
.tour-stage.run[data-scene="4"] .sc4 .tile-live { animation-delay: calc(.2s + var(--i) * .16s); }
.tour-stage.run[data-scene="4"] .sc4 .tile-leaf { animation-delay: calc(.35s + var(--i) * .16s); }
.tour-stage.run[data-scene="8"] .confetti { animation-duration: calc(var(--dur) * .8); }
.tour-end .tour-consult { order: -1; }
@media (prefers-reduced-motion: reduce) { .wipe { display: none; } .kinetic { opacity: 1; animation: none !important; } }

/* ---------- Consultation prompts ---------- */
.cta-card { background: linear-gradient(160deg, #FFF6DE 0%, #FFFFFF 70%); border: 2px solid var(--lantern); border-radius: var(--r-md); padding: 1.2rem 1.3rem; }
.cta-card .cta-title { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-size: var(--step-1); font-weight: 700; color: var(--night); margin: 0 0 .3rem; }
.cta-card .cta-body { margin: 0 0 .9rem; color: #3A4166; font-size: .95rem; }
.cta-card .btn { width: 100%; }
.cta-card .cta-note { margin: .6rem 0 0; font-size: .78rem; color: var(--slate); text-align: center; }
.draws-cta { max-width: 480px; margin: 1.6rem auto 0; }
.tool-sources + .cta-card, .simple-panel + .cta-card { margin-top: 1.2rem; max-width: 520px; }
.float-cta { position: fixed; z-index: 30; inset-inline-end: 1.2rem; bottom: 1.2rem; display: inline-flex; align-items: center; gap: .55rem; padding: .45rem 1.1rem .45rem .45rem; background: var(--night); color: #fff; border-radius: 999px; text-decoration: none; font-weight: 700; box-shadow: 0 12px 30px -10px rgba(27,31,69,.6); translate: 0 140%; transition: translate .35s cubic-bezier(.3,1.4,.5,1); }
html[dir="rtl"] .float-cta { padding: .45rem .45rem .45rem 1.1rem; }
.float-cta.show { translate: 0 0; }
.float-words { display: grid; line-height: 1.15; }
.float-note { font-size: .66rem; font-weight: 600; opacity: .8; max-width: 15rem; }
.tour-note { max-width: 18rem; font-size: .72rem; line-height: 1.35; color: var(--night); background: rgba(255,255,255,.85); border-radius: 10px; padding: .35rem .6rem; }
.cc { width: min(460px, 100%); }
.cc-body { margin: .4rem 0 1.1rem; }
.cc-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.float-cta:hover { background: #2A2E63; }
.float-face { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #CFE6F7; display: grid; place-items: center; overflow: hidden; }
.float-face svg { width: 2.6rem; height: 2.6rem; }
.nudge { position: fixed; z-index: 40; inset-inline-start: 1.2rem; bottom: 1.2rem; width: min(380px, calc(100vw - 2.4rem)); display: grid; grid-template-columns: 76px 1fr; gap: .8rem; align-items: start; background: #fff; border: 2px solid var(--lantern); border-radius: var(--r-lg); padding: 1rem 1.1rem; box-shadow: 0 20px 50px -18px rgba(27,31,69,.5); animation: nudgein .5s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes nudgein { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
.nudge-face svg { width: 76px; height: 76px; }
.nudge-title { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 700; font-size: var(--step-1); color: var(--night); margin: 0 0 .2rem; }
.nudge-body { margin: 0 0 .8rem; font-size: .92rem; color: #3A4166; }
.nudge-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.nudge-actions .btn { padding: .6rem 1.1rem; font-size: .92rem; }
.nudge-later { font: inherit; font-weight: 600; background: none; border: 0; color: var(--slate); cursor: pointer; padding: .4rem .6rem; }
@media (max-width: 960px) {
  .float-cta { bottom: 5.2rem; }
  /* phones: just the goose; tapping it shows the representation-only note before the form */
  .float-words { display: none; }
  .float-cta, html[dir="rtl"] .float-cta { padding: .35rem; }
  .nudge { bottom: 5.2rem; }
}
@media (prefers-reduced-motion: reduce) { .float-cta { transition: none; } .nudge { animation: none; } }

/* ---------- Mascots: icons, page heads, provincial crew ---------- */
.shelf-icon.av { background: #DCEEFB; position: relative; overflow: visible; border: 2px solid #fff; box-shadow: 0 0 0 1.5px #BFD8EC; }
.shelf-icon.av > svg { width: 100%; height: 100%; border-radius: 50%; }
.flag-badge { position: absolute; inset-inline-end: -8px; bottom: -4px; width: 26px; height: 16px; border-radius: 3px; overflow: hidden; box-shadow: 0 2px 6px -2px rgba(27,31,69,.5); }
.flag-badge svg { width: 100%; height: 100%; display: block; }
.page-head { overflow: hidden; }
.page-head .wrap { position: relative; z-index: 2; }
.head-mascot { position: absolute; z-index: 1; bottom: 18px; inset-inline-end: max(1.5rem, calc((100vw - 1180px) / 2 + 1rem)); width: 230px; height: 205px; pointer-events: none; }
.head-mascot svg { width: 100%; height: 100%; animation: headhop .7s .2s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes headhop { from { opacity: 0; translate: 0 60px; } to { opacity: 1; translate: 0 0; } }
.head-mascot .ch-idle, .head-mascot .flag-cloth { animation: none; }
.flag-cloth { transform-box: fill-box; transform-origin: 0% 50%; animation: flagwave 1.3s ease-in-out infinite; }
@keyframes flagwave { 0%,100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(4deg) scaleX(.95); } }
.head-mascot .flag-cloth { animation: flagwave 1.3s ease-in-out infinite; }
.tile-flag { pointer-events: none; }
.sc4 .tile-flag { opacity: 0; }
.tour-stage.run[data-scene="4"] .sc4 .ch-in { animation: hopin .6s var(--dl, .2s) cubic-bezier(.3,1.6,.5,1) forwards; }
.ch-orca .float, .ch-loon .float { animation: float 2.2s ease-in-out infinite; }
.ch-deer .antlers { transform-box: fill-box; transform-origin: 50% 100%; animation: wiggle 1.8s ease-in-out infinite; }
.ch-chipmunk .tail { transform-box: fill-box; transform-origin: 90% 90%; animation: swish 1.2s ease-in-out infinite; }
.ch-owl .wing { transform-box: fill-box; transform-origin: 80% 10%; animation: wave .6s ease-in-out infinite alternate; }
@media (max-width: 960px) { .head-mascot { display: none; } }
@media (prefers-reduced-motion: reduce) { .flag-cloth, .head-mascot svg { animation: none !important; } }
html[dir="rtl"] .kinetic { text-anchor: end; }
.bubble-en { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .bubble-en { text-anchor: middle; }

/* ---------- Occupation picker, job-offer rules card ---------- */
.noc-combo { position: relative; }
.noc-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: .3rem; list-style: none; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(27,31,69,.45); max-height: 320px; overflow-y: auto; }
.noc-list li { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; align-items: baseline; padding: .55rem .7rem; border-radius: 10px; cursor: pointer; }
.noc-list li:hover, .noc-list li.on { background: #FFF3D6; }
.noc-code { font-weight: 800; color: var(--night); font-variant-numeric: tabular-nums; direction: ltr; }
.noc-title { color: var(--ink); direction: ltr; text-align: start; }
.noc-badge { grid-column: 2; justify-self: start; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; background: #EEF1F7; color: var(--slate); }
.noc-badge.hw { background: #DCEFE7; color: var(--fir); }
.noc-badge.hw1 { background: #FFE9B8; color: #7A4B00; }
.hint.warn { color: var(--rose); font-weight: 600; }
.rule-card { margin-top: 1.2rem; padding: 1rem 1.2rem; border-radius: 16px; background: linear-gradient(135deg, #FFF6E0, #FDEBDD); border: 1.5px solid #F3D49A; }
.rule-card h3 { font-size: 1.05rem; margin: .1rem 0 .5rem; }
.rule-card ul { margin: 0 0 .6rem; padding-inline-start: 1.1rem; }
.rule-card li { margin: .25rem 0; font-size: var(--step--1); }
.rule-tag { display: inline-block; margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--maple); padding: .15rem .6rem; border-radius: 99px; }
html[lang="fa"] .rule-tag { letter-spacing: 0; }
.b-note { grid-column: 1 / -1; display: block; color: #B9BEE0; font-size: .78rem; line-height: 1.35; margin-top: .2rem; }

/* ---------- Colourful tool buttons ---------- */
.chips { gap: .6rem; }
.chip { --bg: #F2F6FB; --ac: #1B1F45; display: inline-flex; align-items: center; gap: .55rem; padding: .35rem .9rem .35rem .4rem; border-radius: 999px; background: var(--bg); border: 2px solid color-mix(in srgb, var(--ac) 45%, transparent); color: var(--night); font-weight: 700; text-decoration: none; box-shadow: 0 3px 0 color-mix(in srgb, var(--ac) 55%, transparent); transition: transform .15s ease, box-shadow .15s ease; }
html[dir="rtl"] .chip { padding: .35rem .4rem .35rem .9rem; }
.chip:hover, .chip:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 0 color-mix(in srgb, var(--ac) 60%, transparent); }
.chip:active { transform: translateY(1px); box-shadow: 0 1px 0 color-mix(in srgb, var(--ac) 55%, transparent); }
.chip-ico { width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 2px solid var(--ac); overflow: hidden; flex: none; display: grid; place-items: center; }
.chip-ico svg { width: 100%; height: 100%; display: block; }
.chip-flag { width: 40px; height: 24px; border-radius: 4px; overflow: hidden; flex: none; box-shadow: 0 2px 5px -2px rgba(27,31,69,.5); }
.chip-flag svg { width: 100%; height: 100%; display: block; }
.chip-prov .chip-ico { width: 32px; height: 32px; margin-inline-start: -.9rem; border-color: #1B1F45; }
.chip-go { font-size: 1.25rem; line-height: 1; color: color-mix(in srgb, var(--ac) 80%, #1B1F45); transition: translate .15s ease; }
html[dir="rtl"] .chip-go { transform: scaleX(-1); }
.chip:hover .chip-go { translate: 3px 0; }
html[dir="rtl"] .chip:hover .chip-go { translate: -3px 0; }

/* ---------- Province cards ---------- */
.pcard { cursor: pointer; }
.pcard-in { transform-box: fill-box; transform-origin: 50% 100%; transition: translate .18s ease; animation: cardin .6s calc(.15s + var(--i) * .1s) cubic-bezier(.3,1.6,.5,1) both; }
.pcard:hover .pcard-in, .pcard:focus .pcard-in { translate: 0 -8px; }
.pcard-code { font: 800 18px var(--body); fill: var(--night); }
html[lang="fa"] .pcard-code { font-family: "Figtree", sans-serif; }
@keyframes cardin { from { opacity: 0; translate: 0 30px; } to { opacity: 1; translate: 0 0; } }
.map-flyer { animation: mapfly 7s ease-in-out infinite alternate; }
@keyframes mapfly { from { translate: -40px 8px; } to { translate: 60px -4px; } }

/* ---------- Tour button ---------- */
.tour-btn { position: relative; display: inline-flex; align-items: center; gap: .8rem; padding: .45rem 1.1rem .45rem .45rem; border: 0; border-radius: 999px; cursor: pointer; font: inherit; color: #fff; text-align: start;
  background: linear-gradient(100deg, #D8343F 0%, #EE6A3C 50%, #F0B44C 100%); background-size: 160% 100%;
  box-shadow: 0 5px 0 #A82731, 0 14px 30px -10px rgba(216,52,63,.6); transition: transform .15s ease, box-shadow .15s ease, background-position .4s ease; overflow: hidden; }
html[dir="rtl"] .tour-btn { padding: .45rem .45rem .45rem 1.1rem; }
.tour-btn:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 7px 0 #A82731, 0 18px 34px -10px rgba(216,52,63,.7); }
.tour-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #A82731; }
.tour-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); translate: -120% 0; animation: shine 3.2s 1.2s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 0%, 60% { translate: -120% 0; } 100% { translate: 120% 0; } }
.tb-play { position: relative; width: 46px; height: 46px; flex: none; border-radius: 50%; background: #fff; color: #D8343F; display: grid; place-items: center; }
.tb-play svg { width: 20px; height: 20px; margin-inline-start: 3px; }
html[dir="rtl"] .tb-play svg { transform: scaleX(-1); margin-inline-start: 0; margin-inline-end: 3px; }
.tb-play::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid rgba(255,255,255,.8); animation: ring 1.8s ease-out infinite; }
@keyframes ring { from { scale: 1; opacity: 1; } to { scale: 1.45; opacity: 0; } }
.tb-text { display: grid; line-height: 1.2; }
.tb-text strong { font-size: 1.02rem; }
.tb-text small { font-size: .78rem; font-weight: 600; opacity: .92; }
.tb-faces { display: flex; }
.tb-faces span { width: 30px; height: 30px; border-radius: 50%; background: #FFF7E6; border: 2px solid #fff; overflow: hidden; margin-inline-start: -9px; box-shadow: 0 2px 6px -2px rgba(0,0,0,.35); }
.tb-faces span:first-child { margin-inline-start: 0; }
.tb-faces svg { width: 100%; height: 100%; display: block; }
.tour-btn-big { margin-top: .4rem; }
@media (max-width: 520px) { .tb-faces { display: none; } .tb-text small { font-size: .72rem; } }
@media (prefers-reduced-motion: reduce) { .tour-btn::after, .tb-play::before, .map-flyer, .pcard-in { animation: none !important; } }

/* ---------- Tour: moving caption bubble, colour washes, sunbursts ---------- */
.tour-stagewrap { position: relative; }
.recording .tour-stagewrap { height: 100%; }
.tour-stagewrap .tour-caption { --cap: #fff; --tx: 0px; --ty: 30px; z-index: 2; left: auto; right: auto; bottom: auto; top: auto; background: var(--cap); border: 3px solid var(--night); border-radius: 22px; box-shadow: 0 6px 0 var(--night); text-align: start; padding: .7em 1em; font-size: clamp(.95rem, 1.85vw, 1.3rem); }
.tour-stagewrap .tour-caption::after { content: ""; position: absolute; width: 22px; height: 22px; background: var(--cap); border: 3px solid var(--night); border-top: 0; border-left: 0; }
.tour-caption.cap-in { animation: capin .55s .25s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes capin { from { opacity: 0; translate: var(--tx) var(--ty); scale: .7; rotate: -4deg; } to { opacity: 1; translate: 0 0; scale: 1; rotate: 0deg; } }
/* where the bubble sits, its colour, and which side its tail points to */
.tour-stagewrap[data-scene="1"] .tour-caption { --cap: #FFFFFF; left: 56%; top: 44%; width: 40%; --tx: 60px; --ty: 0px; }
.tour-stagewrap[data-scene="1"] .tour-caption::after { left: -14px; top: 40%; rotate: 135deg; }
.tour-stagewrap[data-scene="2"] .tour-caption { --cap: #FFE9A8; left: 4%; top: 9%; width: 46%; --tx: -60px; --ty: 0px; }
.tour-stagewrap[data-scene="2"] .tour-caption::after { left: 22%; bottom: -14px; rotate: 45deg; }
.tour-stagewrap[data-scene="3"] .tour-caption { --cap: #D7F2E3; left: 46%; top: 61%; width: 50%; --tx: 0px; --ty: 50px; }
.tour-stagewrap[data-scene="3"] .tour-caption::after { left: -14px; top: 40%; rotate: 135deg; }
.tour-stagewrap[data-scene="4"] .tour-caption { --cap: #D5EBFC; left: 52%; top: 9%; width: 44%; --tx: 0px; --ty: -40px; }
.tour-stagewrap[data-scene="4"] .tour-caption::after { left: 30%; bottom: -14px; rotate: 45deg; }
.tour-stagewrap[data-scene="5"] .tour-caption { --cap: #E4DEFB; left: 48%; top: 64%; width: 48%; --tx: 60px; --ty: 20px; }
.tour-stagewrap[data-scene="5"] .tour-caption::after { left: -14px; top: 30%; rotate: 135deg; }
.tour-stagewrap[data-scene="6"] .tour-caption { --cap: #FFDCC7; left: 33%; top: 30%; width: 33%; --tx: 0px; --ty: -40px; }
.tour-stagewrap[data-scene="6"] .tour-caption::after { left: -14px; top: 55%; rotate: 135deg; }
.tour-stagewrap[data-scene="7"] .tour-caption { --cap: #FBD9E7; left: 28%; top: 66%; width: 44%; --tx: 0px; --ty: 40px; }
.tour-stagewrap[data-scene="7"] .tour-caption::after { left: 46%; top: -14px; rotate: 225deg; }
.tour-stagewrap[data-scene="8"] .tour-caption { --cap: #FFFFFF; left: 5%; right: 5%; bottom: 5%; text-align: center; }
.tour-stagewrap[data-scene="8"] .tour-caption::after { display: none; }
html[dir="rtl"] .tour-stagewrap .tour-caption { text-align: start; }

.tour-stage .tint { opacity: 0; transition: opacity .6s ease; }
.tour-stage[data-scene="2"] .tint2, .tour-stage[data-scene="3"] .tint3, .tour-stage[data-scene="4"] .tint4, .tour-stage[data-scene="5"] .tint5,
.tour-stage[data-scene="6"] .tint6, .tour-stage[data-scene="7"] .tint7, .tour-stage[data-scene="8"] .tint8 { opacity: 1; }
.tour-stage[data-scene="1"] .tint1 { opacity: .8; }
.tour-stage[data-scene="5"] .tint5 { opacity: 1; }
.tour-stage .night-stars circle { opacity: 0; }
.tour-stage.run[data-scene="5"] .night-stars circle { animation: twinkle3 1.4s var(--d) ease-in-out infinite; }
@keyframes twinkle3 { 0%,100% { opacity: .2; } 50% { opacity: 1; } }
.rays path { fill: var(--ray); opacity: .8; }
.rays-spin { animation: spin 18s linear infinite; transform-box: view-box; transform-origin: 0 0; }
.rays { opacity: 0; }
.tour-stage.run .sc .rays { animation: fadein .6s .1s forwards; }
@keyframes spin { to { rotate: 360deg; } }
.floater { opacity: 0; font: 800 34px "Figtree", sans-serif; fill: #fff; stroke: #1B1F45; stroke-width: 6px; paint-order: stroke; }
.floater.f-gold { fill: #F0B44C; }
.floater.f-letter { font: 700 46px "Fraunces", serif; fill: #fff; }
.floater.f-fa { font-family: "Vazirmatn", sans-serif; font-weight: 800; }
.tour-stage.run .sc .floater { animation: floatup 2.6s var(--d) ease-out forwards; }
@keyframes floatup { 0% { opacity: 0; translate: 0 30px; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; translate: 0 -120px; } }
.leafy { transform-box: fill-box; transform-origin: center; }
.tour-stage.run .sc .leafy { animation: leafup 3.2s var(--d) ease-in-out forwards; }
@keyframes leafup { 0% { opacity: 0; translate: 0 40px; rotate: -20deg; } 25% { opacity: 1; } 100% { opacity: 0; translate: 40px -260px; rotate: 160deg; } }
.card-tilt { rotate: var(--rot); }
@media (max-width: 720px) {
  .tour-stagewrap .tour-caption, .tour-stagewrap[data-scene] .tour-caption { position: static; width: auto; margin: .6rem 0 0; font-size: .95rem; box-shadow: 0 4px 0 var(--night); text-align: start; }
  .tour-stagewrap .tour-caption::after, .tour-stagewrap[data-scene] .tour-caption::after { display: block; left: 12%; top: -14px; bottom: auto; rotate: 225deg; }
  .tour-stagewrap[data-scene="8"] .tour-caption::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .rays-spin, .floater, .leafy, .tour-caption.cap-in { animation: none !important; } .floater, .leafy { opacity: 0; } }

/* ---------- My profile ---------- */
.nav .nav-profile { background: var(--lantern); color: var(--night); border-radius: 999px; padding: .35rem .9rem; font-weight: 800; }
.nav .nav-profile[aria-current="page"] { box-shadow: 0 0 0 2px #fff; }
.pf-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(1.5rem, 4vw, 3rem); padding-top: 1rem; padding-bottom: 4rem; align-items: start; }
.pf-sticky { position: sticky; top: 120px; display: grid; gap: .8rem; }
.pf-side h2 { font-size: var(--step-2); margin: 0; }
.pf-sum { margin: 0; color: var(--slate); font-weight: 600; }
.pf-results { display: grid; gap: .65rem; }
.pf-card { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "ico body score" "ico st open"; gap: .25rem .8rem; align-items: center; padding: .8rem .95rem; border-radius: 18px; background: #fff; border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.pf-card.st-strong { border-color: #7CC79B; box-shadow: 0 3px 0 #7CC79B; background: #F2FBF5; }
.pf-card.st-possible { border-color: #F0C877; box-shadow: 0 3px 0 #F0C877; background: #FFFAEE; }
.pf-card.st-far { border-color: #E9B49A; box-shadow: 0 3px 0 #E9B49A; }
.pf-ico { grid-area: ico; position: relative; width: 52px; height: 52px; border-radius: 50%; background: #DCEEFB; border: 2px solid #fff; box-shadow: 0 0 0 1.5px #BFD8EC; align-self: start; }
.pf-ico > svg { width: 100%; height: 100%; border-radius: 50%; display: block; }
.pf-body { grid-area: body; min-width: 0; }
.pf-body h3 { font-size: 1.02rem; margin: 0 0 .15rem; }
.pf-note { margin: 0; font-size: .86rem; color: var(--slate); line-height: 1.4; }
.pf-score { grid-area: score; text-align: end; white-space: nowrap; }
.pf-score strong { font: 600 1.7rem/1 var(--display); color: var(--night); font-variant-numeric: tabular-nums; }
.pf-score span { color: var(--slate); font-weight: 600; font-size: .85rem; }
.pf-st { grid-area: st; justify-self: start; font-size: .74rem; font-weight: 800; padding: .12rem .6rem; border-radius: 99px; background: #EEF1F7; color: var(--slate); }
.st-strong .pf-st { background: #2E7D52; color: #fff; }
.st-possible .pf-st { background: var(--lantern); color: var(--night); }
.st-far .pf-st { background: #F6D9CB; color: #8A3A1A; }
.pf-open { grid-area: open; justify-self: end; font-weight: 700; font-size: .85rem; color: var(--night); text-decoration: underline; text-decoration-color: var(--lantern); text-decoration-thickness: 2px; text-underline-offset: 3px; white-space: nowrap; }
.pf-save { margin-top: .3rem; padding: 1.1rem 1.2rem; border-radius: 20px; background: linear-gradient(135deg, var(--night), #34397A); color: #fff; display: grid; gap: .6rem; }
.pf-save-t { margin: 0; font-weight: 700; }
.pf-save .hint { color: #C9CDEB; margin: 0; }
.pf-save .btn { justify-self: start; }
.pf-disc { margin: 0; }
@media (max-width: 960px) { .pf-layout { grid-template-columns: 1fr; } .pf-sticky { position: static; } }
@media (max-width: 480px) { .pf-card { grid-template-columns: 44px minmax(0, 1fr) auto; } .pf-ico { width: 44px; height: 44px; } .pf-score strong { font-size: 1.4rem; } }

/* ---------- Hanging sign ---------- */
.hang { position: absolute; top: 100%; inset-inline-end: clamp(.8rem, 4vw, 3rem); z-index: 25; transform-origin: 50% 0; animation: swing 3.6s ease-in-out infinite; pointer-events: none; }
.hang-ropes { display: block; position: relative; height: 20px; }
.hang-ropes::before, .hang-ropes::after { content: ""; position: absolute; top: 0; width: 3px; height: 22px; background: #8B6A43; border-radius: 2px; }
.hang-ropes::before { left: 26%; } .hang-ropes::after { right: 26%; }
.hang-board { pointer-events: auto; display: flex; align-items: center; gap: .65rem; max-width: 300px; padding: .6rem .9rem .6rem .6rem; border-radius: 16px; text-decoration: none; color: var(--night);
  background: linear-gradient(180deg, #FFE7A6, #F7C95E); border: 3px solid var(--night); box-shadow: 0 5px 0 var(--night), 0 16px 30px -12px rgba(27,31,69,.55); }
html[dir="rtl"] .hang-board { padding: .6rem .6rem .6rem .9rem; }
.hang-board:hover { filter: brightness(1.04); }
.hang-ico { position: relative; width: 46px; height: 46px; flex: none; border-radius: 50%; background: #fff; border: 2px solid var(--night); overflow: hidden; }
.hang-ico svg { width: 100%; height: 100%; display: block; }
.hang-text { display: grid; line-height: 1.2; }
.hang-new { justify-self: start; font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--maple); border-radius: 99px; padding: .08rem .5rem; margin-bottom: .15rem; }
html[lang="fa"] .hang-new { letter-spacing: 0; }
.hang-text strong { font-size: .95rem; }
.hang-sub { font-size: .74rem; font-weight: 600; color: #5A4A1E; }
.hang-min { pointer-events: auto; position: absolute; top: 14px; inset-inline-end: -10px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--night); background: #fff; color: var(--night); font-weight: 800; line-height: 1; cursor: pointer; padding: 0; }
.hang.mini .hang-text, .hang.mini .hang-ropes::after { display: none; }
.hang.mini .hang-board { padding: .35rem; border-radius: 50%; }
.hang.mini .hang-ico { width: 40px; height: 40px; }
@keyframes swing { 0%, 100% { rotate: -2.5deg; } 50% { rotate: 2.5deg; } }
@media (max-width: 720px) { .hang-board { max-width: 230px; gap: .5rem; padding: .45rem .7rem .45rem .45rem; } .hang-ico { width: 38px; height: 38px; } .hang-text strong { font-size: .82rem; } .hang-sub { display: none; } }
.hang.compact { animation: none; }
.hang.compact .hang-ropes { height: 8px; } .hang.compact .hang-ropes::before, .hang.compact .hang-ropes::after { height: 10px; }
.hang.compact .hang-board { max-width: 240px; padding: .25rem .7rem .25rem .25rem; border-radius: 999px; }
html[dir="rtl"] .hang.compact .hang-board { padding: .25rem .25rem .25rem .7rem; }
.hang.compact .hang-ico { width: 30px; height: 30px; }
.hang.compact .hang-new, .hang.compact .hang-sub { display: none; }
.hang.compact .hang-text strong { font-size: .78rem; }
.hang.compact .hang-min { top: 2px; width: 20px; height: 20px; font-size: .75rem; inset-inline-end: -8px; }
.hang.auto-mini { inset-inline-end: .8rem !important; }
.hang.auto-mini .hang-text, .hang.auto-mini .hang-ropes::after, .hang.auto-mini .hang-min { display: none; }
.hang.auto-mini .hang-board { padding: .25rem; border-radius: 50%; }
.hang.auto-mini .hang-ico { width: 36px; height: 36px; }
@media (prefers-reduced-motion: reduce) { .hang { animation: none; } }
body.modal-open .hang { visibility: hidden; }

/* ---------- Sign-up dialog ---------- */
.su { width: min(640px, 100%); }
.su-head { display: flex; gap: .9rem; align-items: center; margin-bottom: .6rem; padding-inline-end: 2.4rem; }
.su-ico { width: 64px; height: 64px; flex: none; border-radius: 50%; background: #FFE7A6; border: 3px solid var(--night); overflow: hidden; position: relative; }
.su-ico svg { width: 100%; height: 100%; display: block; }
.su-head h2 { margin: 0; font-size: var(--step-2); }
.su-lede { margin: .2rem 0 0; color: var(--slate); font-size: .92rem; }
.su-perks { list-style: none; margin: 0 0 1rem; padding: .8rem 1rem; border-radius: 16px; background: #FFF6E0; display: grid; gap: .35rem; }
.su-perks li { position: relative; padding-inline-start: 1.5rem; font-size: .9rem; font-weight: 600; }
.su-perks li::before { content: "★"; position: absolute; inset-inline-start: 0; color: var(--lantern); }
.su-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.su-grid .field { margin-bottom: .7rem; }
.su input:not([type="checkbox"]) { width: 100%; }
.su-opt { margin: -.2rem 0 .7rem; }
.su-checks { display: grid; gap: .65rem; margin: .4rem 0 .9rem; }
.su-checks .check span { font-size: .88rem; line-height: 1.45; }
.su-checks .check.is-off { opacity: .5; }
.su-err { color: var(--rose); font-weight: 700; margin: 0 0 .6rem; min-height: 0; }
.su-go { width: 100%; }
.su-fine, .su-nodiy { font-size: .78rem; }
.su-done { text-align: center; display: grid; gap: .7rem; justify-items: center; padding: 1rem 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) { .su-grid { grid-template-columns: 1fr; } }
/* keep the hanging sign clear of the page mascot on inner pages */
@media (min-width: 961px) {
  body:not([data-view="home"]) .hang { inset-inline-end: calc(max(1.5rem, calc((100vw - 1180px) / 2 + 1rem)) + 250px); }
}

/* ---------- Jobs and wages ---------- */
.wg-title { margin: 0 0 .4rem; font-size: 1.05rem; }
.wg-list { margin: 0 0 1rem; padding-inline-start: 1.1rem; display: grid; gap: .3rem; font-size: .92rem; }
.wg-list .good { color: var(--fir); font-weight: 600; }
.wg-table tr.sub td { font-size: .86rem; color: var(--slate); }
.wg-table tr.here td { background: #FFF3D6; font-weight: 700; }
.wg-table td.num, .wg-table th.num { direction: ltr; }
.wg-meta { margin-top: .6rem; }
@media (max-width: 720px) {
  .hang { inset-inline-end: .6rem; }
  .hang-ropes { height: 8px; } .hang-ropes::before, .hang-ropes::after { height: 10px; }
  .hang-board { max-width: 215px; padding: .25rem .65rem .25rem .25rem; border-radius: 999px; border-width: 2px; box-shadow: 0 3px 0 var(--night), 0 10px 20px -10px rgba(27,31,69,.5); }
  html[dir="rtl"] .hang-board { padding: .25rem .25rem .25rem .65rem; }
  .hang-ico { width: 30px; height: 30px; border-width: 1.5px; }
  .hang-new, .hang-sub { display: none; }
  .hang-text strong { font-size: .76rem; line-height: 1.15; }
  .hang-min { top: 2px; width: 20px; height: 20px; font-size: .75rem; inset-inline-end: -8px; }
  .hero-copy { padding-top: 4.2rem; }
}
.floater { direction: ltr; unicode-bidi: isolate; } .floater.f-fa { direction: rtl; }

/* ---------- Citizenship day counter ---------- */
.ct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.ct-grid .field:nth-child(2) { grid-column: 1 / -1; }
input[type="date"] { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #C6CDDD; border-radius: var(--r-sm); padding: .6rem .7rem; min-height: 48px; }
.ct-trip { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: .7rem; align-items: end; padding: .7rem; border-radius: 12px; background: #F4F7FB; margin-bottom: .6rem; }
.ct-trip .field { margin: 0; min-width: 0; }
.ct-grid .field { min-width: 0; }
.ct-grid input[type="date"], .ct-trip input[type="date"] { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.ct-del { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #E6EAF3; color: var(--night); font-size: 1.3rem; cursor: pointer; }
.ct-add { margin-top: .2rem; }
.ct-bar { height: 10px; border-radius: 99px; background: rgba(255,255,255,.15); overflow: hidden; margin-top: .4rem; }
.ct-bar i { display: block; height: 100%; width: 0; background: var(--lantern); border-radius: 99px; transition: width .4s ease; }
.ct-notes h3 { margin-top: 0; }
.ct-notes ul { margin: 0; padding-inline-start: 1.1rem; display: grid; gap: .35rem; font-size: .92rem; }
@media (max-width: 560px) { .ct-grid { grid-template-columns: 1fr; } .ct-trip { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .ct-del { grid-column: 1 / -1; justify-self: end; } }

/* ---------- Share / print, data sources ---------- */
.share-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.share-bar button { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 700; font-size: .88rem; color: var(--night); background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: .45rem .9rem; cursor: pointer; }
.share-bar button:hover { border-color: var(--lantern); background: #FFF8E8; }
.share-bar svg { width: 18px; height: 18px; }
.sb-msg { font-size: .82rem; color: var(--fir); font-weight: 600; }
.src-list { padding-top: 1rem; padding-bottom: 3rem; }
.src-group { margin-bottom: 1.4rem; }
.src-group h2 { font-size: 1.2rem; margin-bottom: .3rem; }
.src-group ul { margin: 0; padding-inline-start: 1.1rem; }
@media print {
  .sticky-top, .hang, .float-cta, .nudge, .share-bar, .tour-backdrop, .su-backdrop, .head-mascot, .head-ridge, .skip, .consult-scene, .noc-list { display: none !important; }
  body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .page-head { background: none !important; padding-top: 0; }
  .crs-layout, .pf-layout { display: block; }
  .score-panel, .pf-sticky { position: static; }
  .lantern-card { background: #fff !important; color: #000 !important; border: 2px solid #1B1F45; }
  .lantern-card *, .breakdown dt, .breakdown dd { color: #000 !important; }
  .step, .pf-card, .cta-card { break-inside: avoid; }
  .consult { background: #fff !important; color: #000 !important; }
  .consult * { color: #000 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .75em; word-break: break-all; }
  .btn::after, .pf-open::after { content: none !important; }
}

/* ---------- Pool ranking ---------- */
.pool-big { font: 600 1.5rem/1.2 var(--display); color: var(--night); margin: .2rem 0 .5rem; }
.pool-chart { display: flex; align-items: flex-end; gap: 3px; height: 54px; margin-bottom: .5rem; direction: ltr; }
.pool-chart .pb { flex: 1; height: var(--h); background: #C9D3E8; border-radius: 3px 3px 0 0; }
.pool-chart .pb.mine { background: var(--lantern); box-shadow: 0 0 0 2px var(--night); }

/* number boxes (numfix.js) */
.num-box { font-variant-numeric: tabular-nums; }
html[dir="rtl"] .num-box { text-align: right; }
.num-warn { border-color: var(--maple) !important; box-shadow: 0 0 0 3px rgba(213,43,30,.15); }
.num-warn-msg { display: block; margin-top: .35rem; font-size: .8rem; font-weight: 600; color: #A3241A; }
