/* Dareecha WorldMatch (loaded only on /worldmatch pages). Uses the site's Sabz tokens from design.css. */
.wm { --wm-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif; --wm-gold: #e9a23b; --wm-radius: 18px; }
.wm h1, .wm h2, .wm h3, .wm .wm-display { font-family: var(--wm-serif); letter-spacing: -.01em; }

/* Landing hero */
.wm-hero { position: relative; color: #fff; border-radius: 0 0 28px 28px; overflow: hidden; background: #0d3b2e; margin-bottom: 32px; }
.wm-hero-photos { position: absolute; inset: 0; display: grid; grid-template-columns: 1.3fr 1fr 1fr; }
.wm-hero-photos img { width: 100%; height: 100%; object-fit: cover; }
.wm-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 22, 16, .88) 0%, rgba(6, 22, 16, .55) 55%, rgba(6, 22, 16, .2) 100%); }
.wm-hero-inner { position: relative; z-index: 1; padding: 88px 0 72px; max-width: 640px; }
.wm-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; margin: 10px 0 14px; color: #fff; }
.wm-hero p { font-size: 1.15rem; opacity: .92; }
.wm-tagline { font-family: var(--wm-serif); font-style: italic; color: var(--wm-gold); font-size: 1.1rem; }
.wm-hero .wm-credit { position: absolute; z-index: 1; right: 14px; bottom: 10px; margin: 0; font-size: 11px; opacity: .75; }
.wm-hero .wm-credit a { color: #fff; }

/* Buttons and small parts */
.wm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px; border: 1px solid transparent; font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer; line-height: 1.2; transition: transform .15s ease, background .15s ease; }
.wm-btn:focus-visible, .wm-option:focus-within, .wm-mode:focus-within, .wm-chip:focus-within { outline: 3px solid var(--wm-gold); outline-offset: 2px; }
.wm-btn-primary { background: var(--g-accent); color: #fff; }
.wm-btn-primary:hover { background: var(--g-accent-hover); color: #fff; transform: translateY(-1px); }
.wm-btn-light { background: rgba(255, 255, 255, .95); color: #0d3b2e; }
.wm-btn-ghost { background: transparent; border-color: var(--g-line); color: var(--g-ink); }
.wm-hero .wm-btn-ghost, .wm-hero-result .wm-btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .6); }
.wm-btn-ghost.is-on { background: var(--g-accent-soft); border-color: var(--g-accent); color: var(--g-accent); }
.wm-btn-small { padding: 8px 14px; font-size: .9rem; }
.wm-link { background: none; border: 0; padding: 0; color: var(--g-accent); text-decoration: underline; cursor: pointer; font: inherit; }
.wm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.wm-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--g-accent); margin: 0 0 6px; }
.wm-hero .wm-kicker, .wm-hero-result .wm-kicker { color: var(--wm-gold); }
.wm-small { font-size: .88rem; color: var(--g-ink-2); }
.wm-note { background: var(--g-surface); border-radius: 12px; padding: 10px 14px; }
.wm-flag { width: 28px; height: 21px; border-radius: 3px; object-fit: cover; vertical-align: -3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.wm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.wm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--g-line); font-size: .85rem; cursor: pointer; }
.wm-chip.is-on { background: var(--g-accent-soft); border-color: var(--g-accent); color: var(--g-accent); font-weight: 600; }
.wm-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* App */
#wm-app { scroll-margin-top: 90px; min-height: 420px; }
.wm-enter { animation: wm-in .35s ease both; }
@keyframes wm-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.wm-card { background: var(--g-bg); border: 1px solid var(--g-line); border-radius: var(--wm-radius); padding: clamp(18px, 3vw, 32px); margin-bottom: 20px; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
.wm-card h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin: 0 0 10px; }
.wm-intro { text-align: center; max-width: 760px; margin-left: auto; margin-right: auto; }
.wm-intro .wm-actions { justify-content: center; }
.wm-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0 6px; text-align: left; }
.wm-mode { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 2px solid var(--g-line); border-radius: 14px; cursor: pointer; }
.wm-mode.is-on { border-color: var(--g-accent); background: var(--g-accent-soft); }
.wm-mode input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wm-mode span { font-size: .9rem; color: var(--g-ink-2); }
.wm-q { max-width: 760px; margin-left: auto; margin-right: auto; }
.wm-q fieldset { border: 0; padding: 0; margin: 0; }
.wm-q legend { float: none; width: 100%; padding: 0; margin: 0; }
.wm-q legend h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); line-height: 1.2; }
.wm-help { color: var(--g-ink-2); margin: -4px 0 14px; }
.wm-progress { height: 6px; border-radius: 999px; background: var(--g-surface); overflow: hidden; margin-bottom: 18px; }
.wm-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--g-accent), var(--wm-gold)); border-radius: 999px; transition: width .35s ease; }
.wm-options { display: grid; gap: 10px; margin-top: 6px; }
.wm-options-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wm-option { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 14px 18px; border: 2px solid var(--g-line); border-radius: 14px; cursor: pointer; font-size: 1.02rem; background: var(--g-bg); transition: border-color .15s ease, background .15s ease; }
.wm-option:hover { border-color: color-mix(in srgb, var(--g-accent) 45%, var(--g-line)); }
.wm-option input { width: 20px; height: 20px; accent-color: var(--g-accent); flex: 0 0 auto; }
.wm-option.is-on { border-color: var(--g-accent); background: var(--g-accent-soft); }
.wm-budget, .wm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wm-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; border: 0; padding: 0; margin: 0; }
.wm-field input, .wm-field select { font: inherit; font-weight: 400; padding: 12px 14px; border: 1px solid var(--g-line); border-radius: 12px; background: var(--g-bg); color: var(--g-ink); width: 100%; }
.wm-inline { display: flex; gap: 8px; }
.wm-inline select { width: auto; }
.wm-langs { margin-top: 14px; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.wm-langs legend { font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.wm-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.wm-error { color: #b4441b; font-weight: 600; margin: 12px 0 0; }
.wm-loading { text-align: center; padding: 60px 20px; }
.wm-globe { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; border: 4px solid var(--g-accent-soft); border-top-color: var(--g-accent); animation: wm-spin 1s linear infinite; }
@keyframes wm-spin { to { transform: rotate(360deg); } }
.wm-saved ul { list-style: none; padding: 0; margin: 0; text-align: left; }
.wm-saved li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--g-line); }
.wm-saved-acts { font-size: .88rem; }

/* Results */
.wm-hero-result { border-radius: var(--wm-radius); overflow: hidden; background: #0d3b2e center / cover no-repeat; color: #fff; margin-bottom: 24px; min-height: 420px; display: flex; }
.wm-hero-shade { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(22px, 4vw, 44px); background: linear-gradient(180deg, rgba(6, 22, 16, .4) 0%, rgba(6, 22, 16, .55) 40%, rgba(6, 22, 16, .88) 80%); }
.wm-hero-result h2 { font-size: clamp(1.9rem, 5vw, 3.2rem); color: #fff; margin: 0 0 8px; }
.wm-hero-result .wm-flag { width: 40px; height: 30px; vertical-align: 2px; }
.wm-hero-score { font-size: 1.25rem; margin: 0 0 6px; }
.wm-hero-score strong { color: var(--wm-gold); font-size: 1.6rem; }
.wm-hero-why { max-width: 640px; opacity: .92; }
.wm-hero-result .wm-credit { font-size: 11px; opacity: .7; margin: 10px 0 0; }
.wm-hero-result .wm-credit a { color: #fff; }
.wm-h { font-size: 1.6rem; margin: 8px 0 14px; }
.wm-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px; }
.wm-result { border: 1px solid var(--g-line); border-radius: var(--wm-radius); overflow: hidden; background: var(--g-bg); display: flex; flex-direction: column; }
.wm-result-photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; height: auto; }
.wm-result-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.wm-result-head { display: flex; align-items: center; gap: 10px; }
.wm-result-head h3 { font-size: 1.35rem; margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.wm-rank { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--g-accent); color: #fff; font-weight: 700; font-size: .9rem; flex: 0 0 auto; }
.wm-score { font-weight: 800; color: var(--g-accent); white-space: nowrap; }
.wm-result-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.wm-conf { margin: 0; }
.wm-compare-bar { position: sticky; bottom: 76px; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 520px; margin: -8px auto 20px; padding: 10px 12px 10px 18px; border-radius: 999px; background: var(--g-ink); color: var(--g-bg); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.wm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.wm-list { padding-left: 1.1rem; }
.wm-list li { margin-bottom: 8px; }
.wm-bars { list-style: none; padding: 0; margin: 0; }
.wm-bars li { display: grid; grid-template-columns: 1fr 120px 34px; align-items: center; gap: 10px; padding: 6px 0; }
.wm-bar-label em { display: block; font-style: normal; font-size: .78rem; color: var(--g-ink-3); }
.wm-bar { height: 10px; border-radius: 999px; background: var(--g-surface); overflow: hidden; }
.wm-bar span { display: block; height: 100%; background: var(--g-accent); border-radius: 999px; }
.wm-bar-na { height: auto; background: none; font-size: .8rem; color: var(--g-ink-3); }
.wm-bar-val { font-weight: 700; text-align: right; }
.wm-surprise { margin-top: 18px; padding: 16px; border-radius: 14px; background: color-mix(in srgb, var(--wm-gold) 14%, transparent); }
.wm-surprise h4 { font-family: var(--wm-serif); font-size: 1.3rem; }
.wm-reality-box { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--g-line); }
.wm-reality-box h4 { font-size: 1rem; margin: 0 0 6px; }
.wm-reality-box ul { list-style: none; padding: 0; margin: 0 0 6px; font-size: .9rem; }
.wm-reality-box li { padding: 6px 0 6px 12px; border-left: 3px solid var(--g-line); margin-bottom: 6px; }
.wm-st { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.wm-st-good { border-left-color: #127a4b !important; } .wm-st-good .wm-st { color: #127a4b; }
.wm-st-caution { border-left-color: var(--wm-gold) !important; } .wm-st-caution .wm-st { color: #8a5a00; }
.wm-st-unknown .wm-st { color: var(--g-ink-3); }
.wm-sliders { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 20px; margin-top: 16px; }
.wm-slider { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.wm-slider span { display: flex; justify-content: space-between; }
.wm-slider input { accent-color: var(--g-accent); width: 100%; }
.wm-more { padding-left: 1.4rem; columns: 2; column-gap: 32px; }
.wm-more li { margin-bottom: 8px; break-inside: avoid; }
.wm-end { justify-content: center; }

/* Static pages: country grid, country profile, compare */
.wm-section { margin: 40px 0; }
.wm-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.wm-steps li { list-style: none; padding: 20px; border: 1px solid var(--g-line); border-radius: 16px; counter-increment: s; }
.wm-steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--g-accent-soft); color: var(--g-accent); font-weight: 800; margin-bottom: 8px; }
.wm-countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.wm-country { position: relative; display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: #0d3b2e; color: #fff; text-decoration: none; }
.wm-country img.wm-country-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.wm-country:hover img.wm-country-photo { transform: scale(1.05); }
.wm-country span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .75)); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.wm-weights { width: 100%; max-width: 520px; }
.wm-profile-hero { position: relative; border-radius: var(--wm-radius); overflow: hidden; min-height: 340px; display: flex; align-items: flex-end; color: #fff; background: #0d3b2e center / cover no-repeat; margin-bottom: 24px; }
.wm-profile-hero > div { width: 100%; padding: clamp(20px, 4vw, 40px); background: linear-gradient(180deg, transparent, rgba(6, 22, 16, .85)); }
.wm-profile-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); margin: 0; }
.wm-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.wm-fact { padding: 14px 16px; border: 1px solid var(--g-line); border-radius: 14px; }
.wm-fact strong { display: block; font-size: 1.35rem; font-family: var(--wm-serif); }
.wm-fact small { color: var(--g-ink-3); }
.wm-compare-table th { white-space: nowrap; }
.wm-compare-table td, .wm-compare-table th { vertical-align: top; }
.wm-editorial { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--g-ink-3); }

@media (max-width: 767px) {
    .wm-hero-photos { grid-template-columns: 1fr; }
    .wm-hero-photos img:not(:first-child) { display: none; }
    .wm-hero-inner { padding: 56px 0 48px; }
    .wm-modes, .wm-budget, .wm-grid2, .wm-two, .wm-steps { grid-template-columns: 1fr; }
    .wm-options-grid { grid-template-columns: 1fr; }
    .wm-bars li { grid-template-columns: 1fr 90px 30px; }
    .wm-more { columns: 1; }
    .wm-nav .wm-btn { flex: 1; }
    .wm-hero-result { min-height: 360px; }
}
@media (prefers-reduced-motion: reduce) {
    .wm-enter, .wm-globe { animation: none; }
    .wm-btn, .wm-option, .wm-progress span, .wm-country img.wm-country-photo { transition: none; }
}
[data-bs-theme=dark] .wm-st-good .wm-st { color: #5fd39a; }
[data-bs-theme=dark] .wm-st-caution .wm-st { color: #e9a23b; }
[data-bs-theme=dark] .wm-compare-bar { background: #ecf1ee; color: #0d1411; }
.wm [tabindex="-1"]:focus { outline: none; }
.wm-profile-hero .wm-kicker { color: var(--wm-gold); }
.wm-profile-hero > div { background: linear-gradient(180deg, transparent, rgba(6, 22, 16, .55) 35%, rgba(6, 22, 16, .9)); }
.wm-profile-hero p.small { font-size: 12px !important; }
@media (max-width: 575px) { .wm-facts { grid-template-columns: 1fr 1fr; gap: 8px; } .wm-fact { padding: 10px 12px; } .wm-fact strong { font-size: 1.15rem; } }

/* Cost of living and Pakistan vs */
.wm-cost-result { border-color: var(--g-accent); background: color-mix(in srgb, var(--g-accent) 5%, var(--g-bg)); }
.wm-cost-big { font-family: var(--wm-serif); font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 700; color: var(--g-accent); margin: 4px 0 8px; line-height: 1.15; }
.wm-cost-big span { display: block; font-family: inherit; font-size: 1rem; font-weight: 400; color: var(--g-ink-2); }
.wm-compare-table td.is-better { background: color-mix(in srgb, #127a4b 12%, transparent); font-weight: 600; }

/* Urdu (right to left) */
.wm-ur .wm-hero::after { background: linear-gradient(270deg, rgba(6, 22, 16, .88) 0%, rgba(6, 22, 16, .55) 55%, rgba(6, 22, 16, .2) 100%); }
.wm-ur h1, .wm-ur h2, .wm-ur h3, .wm-ur .wm-display { font-family: var(--g-urdu-font); line-height: 1.7; }
.wm-ur .wm-kicker { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.wm-ur .wm-option, .wm-ur .wm-help, .wm-ur p, .wm-ur li { line-height: 1.9; }
.wm-ur .wm-bars li { grid-template-columns: 1fr 110px 34px; }
.wm-ur .wm-bar-val { text-align: left; }
.wm-ur .wm-hero-result h2 .wm-flag { margin-left: 8px; }
@media (max-width: 575px) { .wm-compare-table { font-size: .88rem; } .wm-compare-table tbody th { min-width: 6.5em; } }
