/* USD Page V2 — Phase A · Modern UI + full-page refinement (2026-10-19). Loaded only by page-34.php.
   Scoped to .hmv2 / .hmv2-top, and to body.hmv2-page for the shared header, breadcrumb and footer (header.php/footer.php unchanged).
   One UI system: 12px radius · 1px hairlines · one shadow (calculator only) · 52px controls · 44px secondary controls · 6-step type scale.
   Colour has meaning: blue = action/interaction · green = rate up · red = rate down · grey = supporting information. */

body.hmv2-page, .hmv2, .hmv2-top {
	--ink: #111827; --ink2: #374151; --muted: #6b7280; --faint: #9ca3af;
	--line: #e5e7eb; --hair: #f0f1f3; --soft: #f6f8fa; --skel: #eceef1;
	--blue: #15A2DB; --blue-strong: #0d8cc0; --blue-ink: #0a6a92; --blue-tint: #eef8fc; --blue-line: #cfe9f5;
	--up: #15803d; --down: #b91c1c; --warn: #b45309;
	--r: 12px; --r-sm: 8px; --ctl: 52px; --ctl2: 44px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
	--fs-hero: 2.25rem; --fs-result: 1.625rem; --fs-h2: 1.125rem; --fs-body: 1rem; --fs-meta: .875rem; --fs-micro: .8125rem;
	--gap: 24px;
}
.hmv2 { background: #fff; color: var(--ink); font-size: var(--fs-body); line-height: 1.5; padding-bottom: 32px; }

/* ---------- shared header (this page only) ---------- */
body.hmv2-page { padding-top: 64px; background: #fff; }
body.hmv2-page .header { height: 64px; padding: 0 20px; background: #fff; box-shadow: none; border-bottom: 1px solid var(--line); }
body.hmv2-page .header.scrolled { background: rgba(255, 255, 255, .97); }
body.hmv2-page .header .custom-logo-link { display: flex; align-items: center; }
body.hmv2-page .header .custom-logo { display: block; height: 32px; width: auto; }
body.hmv2-page .header_side { align-items: center; }
body.hmv2-page .ll { width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
body.hmv2-page .ll svg { top: 11px; right: 11px; width: 22px; height: 22px; fill: var(--ink2); }
body.hmv2-page .search_open { display: block; width: 44px; height: 44px; margin-right: 6px; border-radius: 10px; background: transparent; fill: var(--ink2); }
body.hmv2-page .search_open svg { transform: none; top: 12px; right: 12px; width: 20px; height: 20px; }
body.hmv2-page .ll:hover, body.hmv2-page .search_open:hover { background: #f3f4f6; }
body.hmv2-page .ll:focus-visible, body.hmv2-page .search_open:focus-visible, body.hmv2-page .langs a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(21, 162, 219, .35); }
/* language flags: small, even, a quiet "current" state */
body.hmv2-page .header .header_side .langs { gap: 2px; padding-left: 8px; border-left: 1px solid var(--line); }
body.hmv2-page .langs a { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin: 0; border-radius: 8px; opacity: .78; }
body.hmv2-page .langs a img { display: block; width: 20px; height: auto; border: 0; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
body.hmv2-page .langs a:hover { opacity: 1; background: #f3f4f6; }
body.hmv2-page .langs a[aria-current="page"], body.hmv2-page .langs a[href*="/currency-exchange-2/usd-ils/"] { opacity: 1; background: var(--blue-tint); }
body.hmv2-page .langs a span { top: calc(100% + 4px); padding: 3px 7px; border: 0; border-radius: 6px; background: var(--ink); color: #fff; font-size: 11px; white-space: nowrap; pointer-events: none; }
/* side menu (theme: off-canvas below 1600px) */
body.hmv2-page .header nav > ul > li > a svg { width: 20px; height: 20px; flex: none; }
@media (max-width: 1600px) {
	body.hmv2-page .header nav { top: 64px; background: #fff; border-top: 1px solid var(--line); overflow-y: auto; }
	body.hmv2-page .header nav > ul { padding: 12px 16px; }
	body.hmv2-page .header nav > ul > li > a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border: 0; border-radius: 10px; color: var(--ink); }
	body.hmv2-page .header nav > ul > li > a:hover { background: #f3f4f6; }
	body.hmv2-page .header nav > ul > li.current-menu-item > a { border: 0; background: var(--blue-tint); color: var(--blue-ink); font-weight: 600; }
}
/* under 768px the flags move into the side menu (the theme does this under 600px), so they never crowd the logo */
@media (max-width: 767px) {
	body.hmv2-page .header .header_side .langs { display: none; }
	body.hmv2-page nav .langs { display: flex; gap: 4px; margin: 8px 28px 20px; padding: 0; border: 0; }
}
@media (max-width: 600px) {
	body.hmv2-page { padding-top: 56px; }
	body.hmv2-page .header { height: 56px; padding: 0 10px; }
	body.hmv2-page .header .custom-logo { height: 28px; }
	body.hmv2-page .header nav { top: 56px; }
}

/* ---------- breadcrumb + H1 (aligned with the content column) ---------- */
body.hmv2-page .top.hmv2-top { background: #fff; padding: 18px 16px 0; max-width: 1120px; margin: 0 auto; box-sizing: border-box; overflow: visible; }
.hmv2-top #breadcrumbs { margin: 0 0 6px; font-size: var(--fs-micro); line-height: 1.4; color: var(--muted); }
.hmv2-top #breadcrumbs a { color: var(--blue-ink); text-decoration: none; }
.hmv2-top #breadcrumbs a:hover { text-decoration: underline; }
.hmv2-top #breadcrumbs .breadcrumb_last strong { font-weight: 400; }
.hmv2-top #breadcrumbs .breadcrumb_last::before { content: '‹'; margin: 0 4px 0 6px; color: var(--faint); }
body.hmv2-page .top.hmv2-top h1 { margin: 0; font-size: 1.625rem; font-weight: 700; line-height: 1.2; color: var(--ink); letter-spacing: -.01em; }

/* ---------- shared footer (this page only; the year comes from the page-34 filter) ---------- */
body.hmv2-page footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 28px 24px 32px; background: #111827; color: #9ca3af; } /* ad-free page: no anchor-ad room needed */
body.hmv2-page footer .menu { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; }
body.hmv2-page footer .menu li { list-style: none; }
body.hmv2-page footer .menu a { display: block; padding: 8px 12px; border-radius: 8px; color: #d1d5db; font-size: var(--fs-meta); }
body.hmv2-page footer .menu a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
body.hmv2-page footer .copyright { font-size: var(--fs-micro); color: #9ca3af; }
@media (max-width: 600px) {
	body.hmv2-page footer { display: block; padding: 20px 16px 28px; text-align: right; }
	body.hmv2-page footer .menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 -12px 12px; }
}
.hmv2 bdi[dir="ltr"] { unicode-bidi: isolate; direction: ltr; white-space: nowrap; }
.hmv2 button { font-family: inherit; }
.hmv2-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hmv2-h2 { font-size: var(--fs-h2); font-weight: 600; color: var(--ink); margin: 0 0 12px; line-height: 1.35; }
.hmv2-ico { vertical-align: -2px; flex: none; }
.hmv2-rate-main, .hmv2-result-main, .hmv2-over-table td, .hmv2-pop-val, .hmv2-fresh { font-variant-numeric: tabular-nums; }
.hmv2-skel { display: block; background: var(--skel); border-radius: 6px; }

/* ---------- layout ---------- */
/* phone: one column in reading order (main/side wrappers are flattened) */
.hmv2-grid { display: flex; flex-direction: column; }
.hmv2-main, .hmv2-side { display: contents; }
.hmv2-a { order: 1; } .hmv2-pop { order: 3; } .hmv2-rest { order: 4; } .hmv2-tools { order: 5; } .hmv2-extra { order: 6; }
.hmv2-a, .hmv2-rest, .hmv2-extra { padding: 0 16px; }
.hmv2-section-pad { padding: var(--gap) 0; }

/* ---------- 1. today's market rate (hero, no card) ---------- */
.hmv2-rate { padding: 18px 0 18px; }
.hmv2-rate-main { margin: 0; font-size: var(--fs-hero); font-weight: 700; line-height: 1.1; letter-spacing: -.01em; color: var(--ink); }
.hmv2-rate-val { border-radius: 6px; padding: 0 2px; transition: background-color 1.6s ease; }
.hmv2-rate.is-flash .hmv2-rate-val { background-color: rgba(21, 162, 219, .16); transition: none; } /* "the number just refreshed" */
.hmv2-fresh { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 8px 0 0; font-size: var(--fs-micro); color: var(--muted); }
.hmv2-ago:not(:empty)::before { content: '·'; margin-left: 6px; color: var(--faint); }
/* the age text changes every second: on phones it always has its own (reserved) line, so the page never jumps */
@media (max-width: 600px) {
	.hmv2-ago { flex: 0 0 100%; box-sizing: border-box; min-height: 1.45em; padding-right: 20px; }
	.hmv2-ago:not(:empty)::before { content: none; }
}
.hmv2-rate-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 6px 0 0; font-size: var(--fs-micro); color: var(--muted); }
.hmv2-tag { color: var(--ink2); font-weight: 500; }
.hmv2-change.up { color: var(--up); } .hmv2-change.down { color: var(--down); }
.hmv2-info { color: var(--blue-ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(10, 106, 146, .35); }
.hmv2-skel-wrap { display: none; margin: 0; }
.hmv2-rate.is-loading .hmv2-rate-main, .hmv2-rate.is-loading .hmv2-fresh, .hmv2-rate.is-loading .hmv2-rate-meta { display: none; }
.hmv2-rate.is-loading .hmv2-skel-wrap { display: block; }
.hmv2-skel-rate { width: 62%; height: 40px; }
.hmv2-skel-line { width: 44%; height: 14px; margin-top: 10px; }
.hmv2-rate-err { margin: 8px 0 0; font-size: var(--fs-meta); color: var(--ink2); }

/* ---------- 2. calculator (the one card) ---------- */
.hmv2-calc { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 16px; }
.hmv2-row { margin: 0 0 10px; }
.hmv2-amount { display: block; width: 100%; box-sizing: border-box; height: var(--ctl); padding: 0 16px; font-size: 1.25rem; font-family: inherit; color: var(--ink); background: #fff; border: 1px solid #d1d5db !important; border-radius: var(--r); }
.hmv2-amount:hover { border-color: #b8bec6 !important; }
.hmv2-amount:focus { border-color: var(--blue) !important; box-shadow: 0 0 0 3px rgba(21, 162, 219, .18); }
.hmv2-amount::placeholder { color: var(--faint); opacity: 1; }

/* currency selectors: flag · code · name · chevron */
.hmv2-row-pair { display: flex; align-items: center; gap: 10px; }
.hmv2-row-pair .calculator_field { flex: 1 1 0; padding: 0; min-width: 0; min-height: var(--ctl); } /* final height reserved before select2 starts */
.hmv2 .hmv2-row-pair .calculator_field select { height: var(--ctl); }
.hmv2 .select2-container { width: 100% !important; }
.hmv2 .calculator .select2-container--default .select2-selection--single { position: relative; height: var(--ctl); padding: 0; background: #fff; border: 1px solid #d1d5db; border-radius: var(--r); }
.hmv2 .calculator .select2-container--default .select2-selection--single { cursor: pointer; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.hmv2 .calculator .select2-selection__rendered { background: transparent; }
/* hover (mouse only, so touch screens never keep a "stuck" hover): the whole field responds — darker border, soft fill,
   slight lift, darker arrow. Same size (no layout shift). Focus/open keeps its own blue border + ring, clearly different. */
@media (hover: hover) and (pointer: fine) {
	.hmv2 .calculator .select2-container--default:not(.select2-container--open):not(.select2-container--focus) .select2-selection--single:hover { border-color: #9ca3af; background: var(--soft); box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 3px 8px rgba(16, 24, 40, .08); }
	.hmv2 .calculator .select2-container--default:not(.select2-container--open):not(.select2-container--focus) .select2-selection--single:hover::after { border-color: var(--ink2); }
}
.hmv2 .calculator .select2-container--open .select2-selection--single, .hmv2 .calculator .select2-container--focus .select2-selection--single { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21, 162, 219, .18); }
.hmv2 .calculator .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered { height: 100%; padding: 0 14px 0 38px; line-height: normal; display: flex; align-items: center; }
.hmv2 .calculator .select2-selection__rendered > span { display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: 8px; min-width: 0; width: 100%; }
.hmv2 .calculator .select2-selection__rendered .img-flag { width: 22px; height: 15px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); flex: none; }
.hmv2 .calculator .cur-sym { font-weight: 600; color: var(--ink); margin: 0; font-size: 1rem; line-height: 1; flex: none; }
.hmv2 .calculator .cur-desc { color: var(--muted); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
.hmv2 .calculator .select2-selection--single::after { content: ''; position: absolute; left: 15px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-left: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: rotate(-45deg); }
/* swap: part of the calculator */
.hmv2 .calculator_switch { flex: 0 0 40px; width: 40px; height: 40px; position: static; padding: 0; background: none; transition: none; }
.hmv2 .calculator_switch:hover { transform: none; }
.hmv2 .calculator_switch a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; box-sizing: border-box; border: 1px solid #d1d5db; border-radius: 50%; background: #fff; color: var(--blue-ink); cursor: pointer; }
.hmv2 .calculator_switch a:hover, .hmv2 .calculator_switch a:focus-visible { border-color: var(--blue); background: var(--blue-tint); }
.hmv2 .calculator_switch a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(21, 162, 219, .35); }
.hmv2 .calculator_switch a:active { border-color: var(--blue); background: var(--blue-line); } /* tap feedback */
.hmv2 .calculator_switch svg { display: block; flex: none; }
.hmv2 .calculator_switch .hmv2-swap-v { display: none; } /* side by side: ⇄ */

/* quick amounts: one segmented control, secondary to the amount field */
.hmv2-quick-wrap { margin: 4px 0 14px; }
.hmv2-quick-label { display: block; font-size: var(--fs-micro); color: var(--muted); margin: 0 0 6px; }
.hmv2-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #d1d5db; border-radius: var(--r); overflow: hidden; background: #fff; }
.hmv2-chip { height: var(--ctl2); border: 0; border-left: 1px solid var(--line) !important; background: #fff; color: var(--ink2); font-size: 1rem; font-weight: 500; cursor: pointer; }
.hmv2-chip:last-child { border-left: 0 !important; }
.hmv2-chip:hover { background: var(--soft); }
.hmv2-chip:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.hmv2-chip.is-active { background: var(--blue-tint); color: var(--blue-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--blue); }

.hmv2-go { display: block; width: 100%; height: var(--ctl); border-radius: var(--r); background: var(--blue); color: #fff; font-size: 1.125rem; font-weight: 600; cursor: pointer; transition: background-color .15s ease; }
.hmv2-go:hover { background: var(--blue-strong); }
.hmv2-go:focus-visible { outline: 3px solid rgba(21, 162, 219, .35); outline-offset: 2px; }
.hmv2-msg { margin: 10px 0 0; color: var(--down); font-size: var(--fs-meta); }

/* result (inside the card) */
.hmv2-result { margin: 16px 0 0; padding: 16px; border-radius: var(--r); background: var(--blue-tint); border: 1px solid var(--blue-line); }
.hmv2-result-main { margin: 0; font-size: var(--fs-result); line-height: 1.2; color: var(--ink); }
.hmv2-result-main strong { font-weight: 700; }
.hmv2-result-main .hmv2-eq { white-space: nowrap; }
.hmv2-result-main.is-long { font-size: 1.375rem; }  /* long amounts: each side stays on one line inside the card */
.hmv2-result-main.is-xlong { font-size: 1.125rem; }
/* "answer = amount" too wide for one line (measured in JS: fitExpr): two deliberate lines, "amount =" above and the
   answer below, still bold and larger. Same for the date result. Fits on one line = unchanged. */
.hmv2-result-main.is-measure, .hmv2-result-main.is-measure *, .hmv2-date-out.is-measure, .hmv2-date-out.is-measure * { white-space: nowrap; }
.hmv2-result-main.is-measure, .hmv2-date-out.is-measure { display: inline-block; width: auto; max-width: none; }
.hmv2-result-main.is-stacked, .hmv2-date-out.is-stacked { display: flex; flex-direction: column; align-items: flex-start; row-gap: 2px; }
.hmv2-result-main.is-stacked > .hmv2-eq, .hmv2-date-out.is-stacked > .hmv2-date-eq { order: -1; font-size: .8em; font-weight: 400; color: var(--ink2); }
.hmv2-date-out.is-stacked > .hmv2-date-eq { font-size: .9em; }
.hmv2-result-main.is-break bdi, .hmv2-date-out.is-break bdi { white-space: normal; overflow-wrap: anywhere; } /* last resort: never a horizontal scroll */
.hmv2-result-meta { margin: 8px 0 0; font-size: var(--fs-micro); color: var(--muted); }
.hmv2-result-move { margin: 4px 0 0; font-size: var(--fs-meta); color: var(--ink2); }
.hmv2-result-loading, .hmv2-result-err { display: none; }
.hmv2-result.is-loading .hmv2-result-body { display: none; }
.hmv2-result.is-loading .hmv2-result-loading { display: block; }
.hmv2-skel-res { width: 58%; height: 30px; background: #dfeef6; }
.hmv2-result .hmv2-skel-line { background: #dfeef6; }
.hmv2-result.is-busy .hmv2-result-body { opacity: .45; transition: opacity .15s ease; } /* recalculating: the old result stays in place */
.hmv2-result.is-error { background: var(--soft); border-color: var(--line); }
.hmv2-result.is-error .hmv2-result-body { display: none; }
.hmv2-result.is-error .hmv2-result-err { display: block; margin: 0; color: var(--ink2); }

/* ---------- 3. first useful module: over time ---------- */
.hmv2-over { padding: 26px 0 24px; }
.hmv2-over-table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.hmv2-over-table th, .hmv2-over-table td { padding: 9px 0; border-bottom: 1px solid var(--hair); text-align: right; vertical-align: middle; }
.hmv2-over-table tr:last-child th, .hmv2-over-table tr:last-child td { border-bottom: 0; }
.hmv2-over-table th { font-weight: 400; color: var(--ink2); }
.hmv2-over-table th small { color: var(--faint); font-size: .8em; margin-right: 4px; }
.hmv2-over-table td { font-weight: 600; color: var(--ink); white-space: nowrap; }
.hmv2-over-table td:last-child { text-align: left; font-weight: 500; font-size: var(--fs-micro); color: var(--muted); }
.hmv2-diff.up { color: var(--up); } .hmv2-diff.down { color: var(--down); }
/* very long amounts (e.g. billions): each row becomes label | value, with the change on its own line under the value */
.hmv2-over-table.is-long, .hmv2-over-table.is-long tbody { display: block; }
.hmv2-over-table.is-long tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.hmv2-over-table.is-long tr:last-child { border-bottom: 0; }
.hmv2-over-table.is-long th, .hmv2-over-table.is-long td { padding: 0; border: 0; }
.hmv2-over-table.is-long td:last-child { grid-column: 2; text-align: left; }
.hmv2-over-table.is-long td:last-child:empty { display: none; }
.hmv2-over-table.is-measure { width: auto; } /* JS (fitOver): the three columns' natural width */
.hmv2-summary { margin: 12px 0 0; font-size: var(--fs-body); color: var(--ink); }
.hmv2-act { min-height: var(--ctl2); padding: 0 16px; border: 1px solid #d1d5db !important; border-radius: var(--r); background: #fff; color: var(--blue-ink); font-size: .95rem; font-weight: 500; cursor: pointer; }
.hmv2-act:hover, .hmv2-act:focus-visible { border-color: var(--blue) !important; background: var(--blue-tint); }
.hmv2-date-out { margin: 12px 0 0; font-size: 1.05rem; }
.hmv2-date-out:empty { display: none; }
.hmv2-date-out bdi, .hmv2-date-out .hmv2-when { white-space: nowrap; } /* a number never splits from its symbol, nor "ב-" from the date; lines break only between them */
.hmv2-date-sub { margin: 4px 0 0; font-size: var(--fs-micro); color: var(--muted); }
.hmv2-date-sub:empty { display: none; }
.hmv2-date-more { display: inline-block; margin: 10px 0 0; font-size: var(--fs-meta); color: var(--blue-ink); }

/* ---------- secondary tools (date, card fee): closed rows below the result; one open at a time is not enforced ---------- */
.hmv2-tools-more { padding: 0 0 24px; } /* own class: ".hmv2-more" is the popular list's hidden rows (a shared name gave those rows 24px extra) */
.hmv2-tool { margin: 0 0 8px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.hmv2-tool.is-open { border-color: var(--blue-line); }
.hmv2-tool-head { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 9px 14px; border: 0; border-radius: var(--r); background: none; color: var(--ink); text-align: right; cursor: pointer; }
.hmv2-tool-head:hover { background: var(--soft); }
.hmv2-tool-head:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(21, 162, 219, .35); }
.hmv2-tool-ico { color: var(--blue-ink); flex: none; }
.hmv2-tool-txt { flex: 1 1 auto; min-width: 0; }
.hmv2-tool-txt strong { display: block; font-size: .975rem; font-weight: 600; line-height: 1.35; }
.hmv2-tool-txt small { display: block; margin-top: 1px; font-size: var(--fs-micro); color: var(--muted); }
.hmv2-tool-arrow { color: var(--muted); flex: none; transition: transform .15s ease; }
.hmv2-tool.is-open .hmv2-tool-arrow { transform: rotate(180deg); }
.hmv2-tool-body { padding: 2px 14px 16px; border-top: 1px solid var(--hair); }
.hmv2-tool-label { display: block; margin: 0 0 6px; font-size: var(--fs-micro); color: var(--muted); }
.hmv2-tool-input { height: var(--ctl2); padding: 0 12px; box-sizing: border-box; border: 1px solid #d1d5db !important; border-radius: var(--r-sm); background: #fff; font: inherit; color: var(--ink); }
.hmv2-tool-input:focus { border-color: var(--blue) !important; box-shadow: 0 0 0 3px rgba(21, 162, 219, .18); outline: none; }
input[type=date].hmv2-tool-input { min-width: 200px; }
.hmv2-tool-note { margin: 12px 0 0; font-size: var(--fs-micro); line-height: 1.55; color: var(--muted); }
.hmv2-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 12px 0; border: 1px solid #d1d5db; border-radius: var(--r); overflow: hidden; }
.hmv2-seg-btn { height: 40px; border: 0; border-left: 1px solid var(--line) !important; background: #fff; color: var(--ink2); font-size: .9375rem; cursor: pointer; }
.hmv2-seg-btn:last-child { border-left: 0 !important; }
.hmv2-seg-btn:hover { background: var(--soft); }
.hmv2-seg-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.hmv2-seg-btn.is-active { background: var(--blue-tint); color: var(--blue-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--blue); }
.hmv2-fee-intro { margin: 12px 0 6px; color: var(--ink2); }
.hmv2-fee-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hmv2-fee-table th, .hmv2-fee-table td { padding: 9px 0; border-bottom: 1px solid var(--hair); text-align: right; }
.hmv2-fee-table tr:last-child th, .hmv2-fee-table tr:last-child td { border-bottom: 0; }
.hmv2-fee-table th { font-weight: 400; color: var(--ink2); }
.hmv2-fee-table td { white-space: nowrap; }
.hmv2-fee-table td strong { font-weight: 600; color: var(--ink); }
.hmv2-fee-table .hmv2-fee-add { text-align: left; font-size: var(--fs-micro); color: var(--muted); }
.hmv2-fee-table tr.is-own th, .hmv2-fee-table tr.is-own td { background: var(--blue-tint); }
.hmv2-fee-table tr.is-own th { padding-right: 8px; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.hmv2-fee-table tr.is-own td:last-child { padding-left: 8px; border-radius: var(--r-sm) 0 0 var(--r-sm); }
.hmv2-fee-custom { margin: 12px 0 0; }
.hmv2-pct { display: inline-flex; align-items: center; gap: 6px; color: var(--ink2); }
#hmv2FeePct { width: 130px; }
.hmv2-dot { margin: 0 6px; color: var(--faint); }
.hmv2-result-meta > span { white-space: nowrap; }                             /* each item ("1 $ = 3.10 ₪", "עדכון אחרון: 12:30") stays whole… */
.hmv2-result-meta .hmv2-dot::after { content: ""; display: inline-block; } /* …and the line may wrap after a "·" (there was no break point: 7px overflow at 320px) */
.hmv2-result-note { margin: 6px 0 0; font-size: var(--fs-micro); color: var(--muted); }


/* ---------- popular conversions: a tool, not a list ---------- */
.hmv2-pop { padding: var(--gap) 16px 8px; }
.hmv2-pop-note { margin: -6px 0 6px; font-size: var(--fs-micro); color: var(--muted); }
.hmv2-pop-list li { list-style: none; }
.hmv2-pop-row { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 46px; padding: 0 10px; margin: 0 -10px; width: calc(100% + 20px); border-bottom: 1px solid var(--hair) !important; border-radius: var(--r-sm); background: none; color: var(--ink); cursor: pointer; text-align: right; font-size: var(--fs-body); }
.hmv2-pop-row:hover, .hmv2-pop-row:focus-visible { background: var(--soft); }
.hmv2-pop-amt { color: var(--ink2); }
.hmv2-pop-val { margin-right: auto; font-weight: 600; }
.hmv2-chev { color: var(--faint); flex: none; }
.hmv2-pop-row:hover .hmv2-chev { color: var(--blue-ink); }
.hmv2-pop .hmv2-more { display: none; }
.hmv2-pop.is-open .hmv2-more { display: list-item; }
.hmv2-pop-toggle, .hmv2-cur-toggle { margin: 12px 0 0; min-height: 40px; padding: 0 14px; border: 1px solid var(--line) !important; border-radius: var(--r); background: #fff; font-size: var(--fs-meta); color: var(--ink2); cursor: pointer; }

/* ---------- supporting sections: plain, divided ---------- */
.hmv2-chart, .hmv2-explain, .hmv2-faq, .hmv2-method { padding: var(--gap) 0; border-top: 1px solid var(--line); }
.hmv2-chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.hmv2-chart-head .hmv2-h2 { margin: 0; }
.hmv2-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.hmv2-tab { height: 36px; padding: 0 12px; border: 0; border-left: 1px solid var(--line) !important; background: #fff; color: var(--muted); font-size: var(--fs-micro); cursor: pointer; }
.hmv2-tab:last-child { border-left: 0 !important; }
.hmv2-tab:hover { color: var(--ink); background: var(--soft); }
.hmv2-tab.is-active { color: var(--blue-ink); background: var(--blue-tint); font-weight: 600; }
.hmv2-chart-box { position: relative; height: 200px; }
.hmv2-chart-box svg { display: block; width: 100%; height: 100%; overflow: visible; direction: ltr; }
.hmv2-skel-chart { width: 100%; height: 100%; border-radius: var(--r); background: var(--soft); }
.hmv2-chart-msg { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--muted); font-size: var(--fs-meta); background: var(--soft); border-radius: var(--r); }
.hmv2-tip { position: absolute; top: 0; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: 0 4px 12px rgba(16, 24, 40, .08); padding: 4px 8px; font-size: var(--fs-micro); color: var(--ink); white-space: nowrap; transform: translateX(-50%); }
.hmv2-tip b { font-weight: 600; }
.hmv2-chart-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 10px 0 0; font-size: var(--fs-micro); color: var(--muted); }
.hmv2-chart-foot a { color: var(--blue-ink); }
.hmv2-explain p, .hmv2-method li { color: var(--ink2); line-height: 1.65; margin: 0 0 10px; }
.hmv2-explain a, .hmv2-faq a { color: var(--blue-ink); }
.hmv2-method strong { color: var(--ink); font-weight: 600; }
.hmv2-faq details { border-bottom: 1px solid var(--hair); }
.hmv2-faq details:last-of-type { border-bottom: 0; }
.hmv2-faq summary { cursor: pointer; font-weight: 500; list-style: none; position: relative; padding: 14px 0 14px 30px; color: var(--ink); }
.hmv2-faq summary::-webkit-details-marker { display: none; }
.hmv2-faq summary::after { content: ''; position: absolute; left: 4px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-left: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: rotate(-45deg); transition: transform .15s ease; }
.hmv2-faq details[open] summary::after { transform: rotate(135deg); margin-top: -2px; }
.hmv2-faq details p { margin: 0 0 14px; color: var(--ink2); line-height: 1.65; }
.hmv2-method li { list-style: disc; margin-right: 18px; font-size: .95rem; }

/* useful tools */
.hmv2-tools { padding: var(--gap) 16px; border-top: 1px solid var(--line); }
.hmv2-tools ul { margin: 0; }
.hmv2-tools li { list-style: none; }
.hmv2-tools a { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px; margin: 0 -10px; border-bottom: 1px solid var(--hair); border-radius: var(--r-sm); color: var(--ink); }
.hmv2-tools li:last-child a { border-bottom: 0; }
.hmv2-tools a:hover, .hmv2-tools a:focus-visible { background: var(--soft); }
.hmv2-tools a span { flex: 1 1 auto; }
.hmv2-tools strong { display: block; font-weight: 500; color: var(--ink); }
.hmv2-tools small { display: block; font-size: var(--fs-micro); color: var(--muted); }
.hmv2-tools a:hover .hmv2-chev { color: var(--blue-ink); }

/* 1 $ in every currency: search + 12 rows; the rest (still in the HTML) behind "show all" or a search */
.hmv2-fx { padding: var(--gap) 0; border-top: 1px solid var(--line); }
.hmv2-fx-note { margin: -6px 0 12px; font-size: var(--fs-micro); color: var(--muted); }
.hmv2-fx-search { position: relative; margin: 0 0 6px; }
.hmv2-fx-search-ico { position: absolute; right: 13px; top: 13px; color: var(--faint); pointer-events: none; }
.hmv2-fx-q { display: block; width: 100%; box-sizing: border-box; height: var(--ctl2); padding: 0 40px 0 12px; border: 1px solid #d1d5db !important; border-radius: var(--r); background: #fff; font: inherit; font-size: 1rem; color: var(--ink); -webkit-appearance: none; appearance: none; }
.hmv2-fx-q:focus { border-color: var(--blue) !important; box-shadow: 0 0 0 3px rgba(21, 162, 219, .18); outline: none; }
.hmv2-fx-q::placeholder { color: var(--faint); opacity: 1; }
.hmv2-fx-list { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 28px; margin: 0; padding: 0; }
.hmv2-fx-item { list-style: none; min-width: 0; }
.hmv2-fx-item[hidden] { display: none !important; }
.hmv2-fx-row { display: flex; align-items: center; gap: 10px; width: calc(100% + 16px); min-height: 46px; margin: 0 -8px; padding: 0 8px; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--hair) !important; border-radius: var(--r-sm); background: none; color: var(--ink); font-size: .9375rem; text-align: right; text-decoration: none; cursor: pointer; }
.hmv2-fx-row:hover, .hmv2-fx-row:focus-visible { background: var(--soft); }
.hmv2-fx-row::after { content: ''; flex: none; width: 7px; height: 7px; margin: 0 2px 0 4px; border-left: 1.6px solid var(--faint); border-bottom: 1.6px solid var(--faint); transform: rotate(45deg); } /* ‹ drawn in CSS: no SVG per row */
.hmv2-fx-row:hover::after { border-color: var(--blue-ink); }
.hmv2-flag { display: block; width: 22px; height: 15px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); flex: none; }
.hmv2-fx-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); }
.hmv2-fx-name small { margin-right: 4px; font-size: .8em; color: var(--muted); }
.hmv2-fx-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.hmv2-fx.is-collapsed:not(.is-searching) .hmv2-fx-more { display: none; }
.hmv2-fx.is-searching .hmv2-fx-toggle { display: none; }
.hmv2-fx-empty { margin: 10px 0 0; font-size: var(--fs-meta); color: var(--muted); }
.hmv2-fx-star { margin-right: 2px; color: var(--warn); font-weight: 600; }
.hmv2-fx-stored .hmv2-fx-val { color: var(--ink2); font-weight: 500; }
.hmv2-fx-foot { margin: 10px 0 0; font-size: var(--fs-micro); color: var(--muted); }
.hmv2-fx-toggle { margin: 12px 0 0; min-height: 40px; padding: 0 14px; border: 1px solid var(--line) !important; border-radius: var(--r); background: #fff; font-size: var(--fs-meta); color: var(--ink2); cursor: pointer; }

/* currency dropdown (select2 appends it to <body>; the page marks it .hmv2-dd when it opens) */
.hmv2-dd { border-color: #d1d5db !important; border-radius: 12px !important; overflow: hidden; box-shadow: 0 10px 28px rgba(16, 24, 40, .12); }
.hmv2-dd .select2-search--dropdown { padding: 8px; }
.hmv2-dd .select2-search__field { height: 40px; padding: 0 10px !important; box-sizing: border-box; border: 1px solid #d1d5db !important; border-radius: 8px; font-size: 16px; } /* 16px: no zoom-in on iPhone */
.hmv2-dd .select2-search__field:focus { border-color: #15A2DB !important; outline: none; }
.hmv2-dd .select2-results > .select2-results__options { max-height: 320px; }
.hmv2-dd .select2-results__group { padding: 8px 12px 4px; font-size: 12px; font-weight: 600; color: #6b7280; }
.hmv2-dd .select2-results__option { padding: 0; }
.hmv2-dd .select2-results__option[role=group] { padding: 0; }
.hmv2-opt { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; }
.hmv2-opt .img-flag { display: block; width: 22px; height: 15px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); flex: none; }
.hmv2-opt .cur-sym { font-weight: 600; color: #111827; flex: none; }
.hmv2-opt .cur-desc { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #374151; }
.hmv2-opt-sym { flex: none; font-size: 13px; color: #6b7280; }
.hmv2-dd .select2-results__option--highlighted[aria-selected] { background: #eef8fc !important; color: #111827 !important; }
.hmv2-dd .select2-results__option[aria-selected=true] { background: #f6f8fa; }
.hmv2-dd .select2-results__message { padding: 12px; color: #6b7280; }

/* embed code (old "המחשבון שלנו באתר שלך" box): one quiet line, collapsed */
.hmv2-embed { padding: 4px 0 8px; border-top: 1px solid var(--line); font-size: var(--fs-meta); color: var(--ink2); }
.hmv2-embed summary { cursor: pointer; list-style: none; position: relative; padding: 14px 0 14px 30px; color: var(--muted); }
.hmv2-embed summary::-webkit-details-marker { display: none; }
.hmv2-embed summary::after { content: ''; position: absolute; left: 4px; top: 50%; width: 7px; height: 7px; margin-top: -5px; border-left: 1.6px solid var(--faint); border-bottom: 1.6px solid var(--faint); transform: rotate(-45deg); }
.hmv2-embed[open] summary::after { transform: rotate(135deg); margin-top: -1px; }
.hmv2-embed p { margin: 0 0 8px; }
.hmv2-embed textarea { display: block; width: 100%; box-sizing: border-box; margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--soft); color: var(--ink2); font: 12px/1.5 ui-monospace, Consolas, monospace; direction: ltr; text-align: left; resize: none; }

/* ---------- desktop ---------- */
@media (min-width: 901px) {
	.hmv2, .hmv2-top { --fs-hero: 2.75rem; --fs-result: 1.75rem; --gap: 32px; }
	.hmv2-grid { display: grid; grid-template-columns: minmax(0, 720px) 300px; column-gap: 48px; justify-content: center; max-width: 1120px; margin: 0 auto; padding: 4px 24px 0; }
	.hmv2-main, .hmv2-side { display: block; min-width: 0; }
	.hmv2-a, .hmv2-rest, .hmv2-extra { padding: 0; }
	body.hmv2-page .top.hmv2-top { padding: 28px 24px 0; }
	body.hmv2-page .top.hmv2-top h1 { font-size: 2rem; }
	.hmv2-fx-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	/* desktop first block: centred rate + a compact, emphasised calculator (not stretched across the 720px column) */
	.hmv2-a { max-width: 600px; margin: 0 auto; }
	.hmv2-rate { padding: 24px 0 22px; text-align: center; }
	.hmv2-fresh, .hmv2-rate-meta { justify-content: center; }
	.hmv2-calc { padding: 22px 24px 24px; border-color: #d9e2ea; box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 32px rgba(16, 24, 40, .10); }
	.hmv2-calc .hmv2-h2 { font-size: 1.1875rem; margin-bottom: 14px; }
	.hmv2 { --ctl: 48px; }
	.hmv2-amount { font-size: 1.125rem; }
	.hmv2-row-pair { gap: 10px; }
	.hmv2 .calculator .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered { padding: 0 12px 0 32px; }
	.hmv2 .calculator .select2-selection--single::after { left: 13px; }
	.hmv2 .calculator .cur-desc { font-size: .9rem; }
	.hmv2-go { width: 100%; max-width: 360px; margin: 0 auto; }
	.hmv2-over-table { max-width: none; }
	.hmv2-pop { padding: 28px 0 8px; }
	/* side column stays secondary to the calculator */
	.hmv2-side .hmv2-h2 { font-size: 1rem; }
	.hmv2-pop-row { min-height: 40px; font-size: .9375rem; }
	.hmv2-pop-amt { color: var(--muted); }
	.hmv2-pop-val { font-weight: 500; color: var(--ink2); }
	.hmv2-pop .hmv2-more { display: list-item; }
	.hmv2-pop-toggle { display: none; }
	.hmv2-tools { padding: var(--gap) 0; }
	.hmv2-chart-box { height: 240px; }
}
/* phones: stack the currency boxes; the swap button sits on the seam between them */
@media (max-width: 600px) {
	.hmv2-row-pair { position: relative; flex-direction: column; align-items: stretch; gap: 8px; }
	.hmv2-row-pair .calculator_field { flex: none; width: 100%; }
	.hmv2 .calculator_switch { position: absolute; left: 44px; top: 50%; margin-top: -20px; z-index: 2; }
	.hmv2 .calculator_switch a { box-shadow: 0 0 0 4px #fff; }
	.hmv2 .calculator_switch a:focus-visible { box-shadow: 0 0 0 4px #fff, 0 0 0 7px rgba(21, 162, 219, .35); }
	.hmv2 .calculator_switch .hmv2-swap-h { display: none; } /* stacked: ⇅ */
	.hmv2 .calculator_switch .hmv2-swap-v { display: block; }
	.hmv2-chart-head { display: block; }
	.hmv2-chart-head .hmv2-h2 { margin-bottom: 10px; }
	.hmv2-tabs { display: flex; }
	.hmv2-tab { flex: 1 1 0; }
}
@media (max-width: 359px) {
	.hmv2-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.hmv2-chip-4 { display: none; }
	.hmv2-chip:nth-child(3) { border-left: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
	.hmv2-rate-val, .hmv2-go, .hmv2-faq summary::after { transition: none !important; }
}
