/* ============================================================================
   HAIMASHER — branded light theme for MultilanguageCms
   Brand: a single navy, #31466A, carried as a 50–950 ramp. One colour, many
   steps: navy is the action colour, the ink, the footer and the focus ring, so
   every surface reads as the same brand without a second hue competing.

   Interaction follows Apple's WWDC design principles, translated for the web:
     • Response    — feedback on press, not on release; nothing on the input path waits.
     • Behaviour   — one critically damped curve for UI motion, no overshoot on
                     things that weren't thrown; motion never locks out input.
     • Materials   — a white, lightly translucent header that content scrolls under;
                     solid when transparency is reduced.
     • Typography  — one family, hierarchy from weight + size + leading, tracking
                     that tightens as type grows and loosens as it shrinks.
   Plain CSS; RTL (he) + LTR (en) via logical properties.

   NOTE: --wc-navy / --wc-accent are read by ThemesController for the admin
   swatch, so keep them defined here as literal colours.
   ========================================================================== */

/* ── 1. Design tokens ───────────────────────────────────────────────────── */
:root {
    /* Brand ramp, built around #31466A (700). Contrast against white (measured):
       500 6.1:1 · 600 7.6:1 · 700 9.5:1 · 800 11.4:1 · 900 14.4:1 — every step
       from 500 up passes AA for body text, so any of them can carry words.
       400 (3.8:1) is for non-text marks only. */
    --hm-brand-50:  #F3F6FA;
    --hm-brand-100: #E4EAF2;
    --hm-brand-200: #C9D4E4;
    --hm-brand-300: #9FB0CB;
    --hm-brand-400: #6E84AA;
    --hm-brand-500: #4A6290;
    --hm-brand-600: #3C5480;
    --hm-brand-700: #31466A;   /* the brand colour */
    --hm-brand-800: #283A58;
    --hm-brand-900: #1D2A40;
    --hm-brand-950: #141D2D;

    /* Surfaces */
    --hm-bg:           #FFFFFF;                 /* page canvas */
    --hm-surface:      #FFFFFF;                 /* cards, inputs */
    --hm-tile:         var(--hm-brand-50);      /* alternate bands, soft panels */
    --hm-glass:        rgba(255, 255, 255, .94);/* header material — white, a breath of see-through */

    /* Text — brand-tinted ink rather than neutral black, so type and brand agree */
    --hm-fg:           var(--hm-brand-900);     /* headings, primary labels */
    --hm-fg-2:         #2F3A4D;                 /* long-form body copy (11.5:1) */
    --hm-muted:        #5B6880;                 /* secondary labels (5.6:1 on white, 5.2:1 on tile) */
    --hm-hairline:     var(--hm-brand-100);     /* borders, only where space can't separate */

    /* Action colour = the brand. Hover deepens, press deepens again. */
    --hm-accent:       var(--hm-brand-700);
    --hm-accent-hover: var(--hm-brand-800);
    --hm-accent-press: var(--hm-brand-900);
    --hm-link:         var(--hm-brand-700);
    --hm-ring:         var(--hm-brand-500);     /* solid focus ring, 6.1:1 on white */

    /* Shape */
    --hm-r-sm:   10px;
    --hm-r-md:   14px;
    --hm-r-lg:   22px;
    --hm-r-pill: 980px;

    /* Depth — soft and wide, never a hard drop; tinted with the brand ink so
       shadows read as part of the palette rather than grey smudges. */
    --hm-sh-1: 0 1px 2px rgba(29,42,64,.05), 0 2px 8px rgba(29,42,64,.05);
    --hm-sh-2: 0 4px 12px rgba(29,42,64,.07), 0 12px 32px rgba(29,42,64,.08);
    --hm-sh-3: 0 18px 44px -12px rgba(29,42,64,.28), 0 2px 6px rgba(29,42,64,.06);

    /* Motion. --hm-spring approximates a critically damped spring (damping 1.0,
       response ~0.4s): fast start, long soft settle, no overshoot. --hm-press is
       the near-instant curve for touch-down feedback. */
    --hm-spring:   cubic-bezier(.32, .72, 0, 1);
    --hm-ease-out: cubic-bezier(.25, 1, .5, 1);
    --hm-dur:      .45s;
    --hm-dur-fast: .2s;
    --hm-press:    .1s;

    /* CMS bridge tokens (admin swatch + Bootstrap fallback). Literal values —
       ThemesController parses them out of this file with a regex. */
    --wc-navy:   #31466A;
    --wc-navy2:  #1D2A40;
    --wc-accent: #31466A;

    /* Page-template tokens (see _Head): the landing hero is a quiet brand-50
       band with navy type, not a coloured gradient. */
    --page-hero-bg:  var(--hm-brand-50);
    --page-hero-fg:  var(--hm-brand-900);
    --page-soft-bg:  var(--hm-brand-50);
    --page-measure:  780px;     /* ~70 characters of body copy */

    /* Header tokens (see _Head) — a WHITE header. The _Head default is dark
       because most logos are light-on-dark; this site's seal is navy on white,
       so the brand reads best on a white bar. */
    --header-bg:         var(--hm-glass);
    --header-fg:         var(--hm-brand-900);
    --header-fg-muted:   #3F4D66;                  /* 8.5:1 on white */
    --header-border:     var(--hm-brand-100);
    --header-accent:     var(--hm-brand-700);      /* white text on it = 9.5:1 (language chip) */
    --header-panel-bg:   #FFFFFF;
    --header-panel-soft: var(--hm-brand-50);
}

/* ── 2. Bootstrap variable remap ───────────────────────────────────────── */
:root {
    --bs-body-bg:          var(--hm-bg) !important;
    --bs-body-color:       var(--hm-fg) !important;
    --bs-emphasis-color:   var(--hm-fg) !important;
    --bs-secondary-color:  var(--hm-muted) !important;
    --bs-border-color:     var(--hm-hairline) !important;
    --bs-border-radius:    var(--hm-r-sm) !important;
    --bs-primary:          var(--hm-accent) !important;
    --bs-primary-rgb:      49,70,106 !important;
    --bs-link-color:       var(--hm-link) !important;
    --bs-link-color-rgb:   49,70,106 !important;
    --bs-link-hover-color: var(--hm-brand-900) !important;
    --bs-heading-color:    var(--hm-fg) !important;
    color-scheme: light;
}
.bg-primary     { background: var(--hm-accent) !important; }
.text-primary   { color: var(--hm-accent) !important; }
.border-primary { border-color: var(--hm-accent) !important; }
.text-muted     { color: var(--hm-muted) !important; }
.bg-light       { background: var(--hm-tile) !important; }

/* ── 3. Canvas & typography ────────────────────────────────────────────────
   Hierarchy is weight + size + leading as a set. Tracking is size-specific:
   display sizes tighten, body sits at 0, small labels open up slightly.

   The root follows the visitor's own text-size setting (100%). site.css pins
   it to 14px below 768px, which shrank 17px body copy to 14.9px on phones and
   dropped inputs under 16px — the size at which iOS zooms the page on focus.

   Hebrew needs more leading than Latin: its letters sit on a tall, flat band
   with few descenders, so tight Latin-style leading makes lines run together. */
html { font-size: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
    background-color: var(--hm-bg);
    color: var(--hm-fg);
    font-family: var(--hm-font, var(--font-base));
    font-size: 1.0625rem;          /* 17px */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-optical-sizing: auto;
    /* site.css keeps the ASP.NET scaffold's `margin-bottom: 60px` (room for a
       fixed footer this CMS doesn't have), which left a strip under the footer. */
    margin-bottom: 0;
}
/* Type scale — 17px body on a ~1.25 ratio, fluid between phone and desktop:
   h1 32→52 · h2 26→38 · h3 21→26 · h4 19 · h5/h6 17 · small 14 */
h1, h2, h3, h4, h5, h6 { color: var(--hm-fg); font-family: var(--hm-font-display, var(--font-base)); text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3.25rem);       font-weight: 700; line-height: 1.12; letter-spacing: -.022em; }
h2 { font-size: clamp(1.625rem, 1.3rem + 1.5vw, 2.375rem);  font-weight: 700; line-height: 1.18; letter-spacing: -.018em; }
h3 { font-size: clamp(1.3125rem, 1.15rem + .6vw, 1.625rem); font-weight: 600; line-height: 1.3;  letter-spacing: -.01em; }
h4 { font-size: 1.1875rem; font-weight: 600; line-height: 1.35; }
h5, h6 { font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }
p  { line-height: 1.7; text-wrap: pretty; }
small, .small { font-size: .875rem; letter-spacing: .01em; }
.lead { font-size: clamp(1.1875rem, 1.1rem + .4vw, 1.375rem); line-height: 1.55; color: var(--hm-muted); font-weight: 400; }
/* Hebrew glyphs are already compact; full Latin-style negative tracking
   crowds them. Keep the direction of the rule, at a third of the strength. */
[dir="rtl"] h1, [dir="rtl"] h2 { letter-spacing: -.006em; }
[dir="rtl"] h3, [dir="rtl"] h4 { letter-spacing: 0; }

/* Phone gutter: Bootstrap's 12px side padding is cramped for 17px text; 20px
   gives the page the same breathing room as the header and footer. */
@media (max-width: 575.98px) { .container, .container-fluid { --bs-gutter-x: 2.5rem; } }

a { color: var(--hm-link); text-decoration: none; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--hm-brand-900); text-decoration: underline; }
::selection { background: var(--hm-brand-200); color: var(--hm-brand-950); }

/* Eyebrow label above a headline: <p class="hm-eyebrow">New</p> */
.hm-eyebrow { font-size: .875rem; font-weight: 600; letter-spacing: .02em; color: var(--hm-brand-600); margin-bottom: .4rem; }

/* ── 4. Header — white, branded ─────────────────────────────────────────────
   Two header implementations can render (see the note in _Header.cshtml):
   4a styles this template's own Bootstrap navbar; 4b re-skins the admin-chosen
   Top Navigation layout "Masthead". Both are the same white bar with navy type,
   a navy underline for hover/current, white panels with a navy top rule, and
   the scroll edge effect: a hairline + soft shadow only once content scrolls
   underneath (html.hm-scrolled, set in _Layout). */

/* 4a. Haimasher's own navbar ------------------------------------------------ */
.navbar.hm-nav {
    background: var(--header-bg) !important;
    -webkit-backdrop-filter: saturate(180%) blur(16px);
            backdrop-filter: saturate(180%) blur(16px);
    position: sticky; top: 0; z-index: 1030;
    min-height: 4.25rem; padding-block: .35rem;
    box-shadow: 0 1px 0 var(--header-border);
    transition: box-shadow var(--hm-dur) var(--hm-ease-out);
}
.hm-scrolled .navbar.hm-nav { box-shadow: 0 1px 0 var(--header-border), 0 10px 30px -12px rgba(29,42,64,.22); }

.hm-nav .navbar-brand { color: var(--header-fg) !important; font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; line-height: 1; }
.hm-nav .navbar-brand img { max-height: 44px; width: auto; display: block; }
.hm-nav .nav-link {
    position: relative;
    color: var(--header-fg-muted) !important;
    font-size: .9375rem; font-weight: 500;
    padding-inline: .8rem !important; border-radius: var(--hm-r-sm);
    transition: color var(--hm-dur-fast) var(--hm-ease-out);
}
.hm-nav .nav-link:hover, .hm-nav .nav-link:focus-visible,
.hm-nav .nav-link.show { color: var(--hm-brand-700) !important; text-decoration: none; }
.hm-nav .nav-link.active, .hm-nav .nav-link[aria-current="page"] { color: var(--hm-brand-700) !important; font-weight: 600; }
@media (min-width: 992px) {
    /* Underline that grows from the reading edge on hover; stays on the current page.
       Not on dropdown toggles: Bootstrap draws their caret with the same ::after. */
    .hm-nav .navbar-nav > .nav-item > .nav-link:not(.dropdown-toggle)::after {
        content: ""; position: absolute; inset-inline: .8rem; bottom: .15rem; height: 2px; border-radius: 2px;
        background: var(--hm-brand-300); scale: 0 1; transform-origin: left;
        transition: scale var(--hm-dur) var(--hm-spring), background-color var(--hm-dur-fast) linear;
    }
    .hm-nav .navbar-nav[dir="rtl"] > .nav-item > .nav-link:not(.dropdown-toggle)::after { transform-origin: right; }
    .hm-nav .navbar-nav > .nav-item > .nav-link:not(.dropdown-toggle):hover::after,
    .hm-nav .navbar-nav > .nav-item > .nav-link:not(.dropdown-toggle).show::after { scale: 1 1; }
    .hm-nav .navbar-nav > .nav-item > .nav-link:not(.dropdown-toggle).active::after,
    .hm-nav .navbar-nav > .nav-item > .nav-link:not(.dropdown-toggle)[aria-current="page"]::after { scale: 1 1; background: var(--hm-brand-700); }
}

.hm-nav .navbar-toggler {
    border: 1px solid var(--header-border); border-radius: var(--hm-r-sm); padding: 0;
    min-width: 44px; min-height: 44px;          /* minimum touch target */
    align-items: center; justify-content: center;
}
/* `display` only below lg — setting it unconditionally would beat Bootstrap's
   .navbar-expand-lg rule that hides the toggler on desktop. */
@media (max-width: 991.98px) { .hm-nav .navbar-toggler { display: inline-flex; } }
.hm-nav .navbar-toggler:active { background: var(--header-panel-soft); }
.hm-nav .navbar-toggler:focus { box-shadow: 0 0 0 3px var(--hm-brand-200); }
.hm-nav .navbar-toggler-icon {
    width: 1.25rem; height: 1.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath stroke='%231D2A40' stroke-width='1.8' stroke-linecap='round' d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E");
}

/* Language switcher (an outline button) on the white bar */
.hm-nav .btn-outline-secondary {
    color: var(--header-fg-muted) !important; border-color: var(--header-border) !important;
    background: transparent !important; border-radius: var(--hm-r-pill) !important;
    font-size: .8125rem; font-weight: 600;
}
.hm-nav .btn-outline-secondary:hover { background: var(--header-panel-soft) !important; color: var(--hm-brand-700) !important; }

/* Header search: a soft brand-50 pill */
.hm-nav .hm-nav-search {
    max-width: 200px; min-height: 2.5rem !important;
    background: var(--hm-brand-50) !important; color: var(--header-fg) !important;
    border: 1px solid transparent !important; border-radius: var(--hm-r-pill) !important;
    font-size: 1rem;
}
.hm-nav .hm-nav-search::placeholder { color: var(--hm-muted) !important; }
.hm-nav .hm-nav-search:focus { background: #fff !important; border-color: var(--hm-brand-500) !important; box-shadow: 0 0 0 3px var(--hm-brand-100) !important; }

/* Mobile drawer: roomy rows on the white bar. */
@media (max-width: 991.98px) {
    .hm-nav .navbar-collapse { padding-block: .5rem 1rem; }
    .hm-nav .navbar-nav .nav-link { font-size: 1.0625rem; padding-block: .8rem !important; border-bottom: 1px solid var(--header-border); border-radius: 0; }
}

/* Dropdown + mega panel: white card with a navy top rule. They materialise
   from their trigger: opacity + scale from the edge the panel hangs off. The
   standalone `scale` property is used, not `transform`, because _Scripts
   nudges panels with `translate`. */
.hm-nav .dropdown-menu, .hm-nav .mega-panel {
    background: var(--header-panel-bg) !important;
    border: 1px solid var(--header-border) !important;
    border-top: 2px solid var(--hm-brand-700) !important;
    border-radius: 0 0 var(--hm-r-md) var(--hm-r-md) !important;
    box-shadow: var(--hm-sh-3);
    padding: .5rem;
    transform-origin: top left;
    transition: opacity var(--hm-dur-fast) var(--hm-ease-out), scale var(--hm-dur) var(--hm-spring);
}
.hm-nav .dropdown-menu:dir(rtl), .hm-nav .mega-panel:dir(rtl) { transform-origin: top right; }
.hm-nav .mega-panel { transform-origin: top center; }
@starting-style {
    .hm-nav .dropdown-menu.show, .hm-nav .mega-panel.show { opacity: 0; scale: .97; }
}
.hm-nav .dropdown-item, .hm-nav .mega-link {
    color: var(--hm-fg) !important; font-size: .9375rem; font-weight: 500;
    border-radius: 8px; padding: .55rem .8rem;
    transition: background-color .12s linear, color .12s linear;
}
.hm-nav .dropdown-item:hover, .hm-nav .dropdown-item:focus,
.hm-nav .mega-link:hover, .hm-nav .mega-link:focus {
    background: var(--header-panel-soft) !important; color: var(--hm-brand-700) !important; text-decoration: none;
}
.hm-nav .dropdown-item.active, .hm-nav .mega-link.active { background: var(--hm-brand-50) !important; color: var(--hm-brand-700) !important; font-weight: 600; }
.hm-nav .mega-column-title { color: var(--hm-muted) !important; font-size: .8125rem; font-weight: 600; letter-spacing: .02em; }
.hm-nav .dropdown-divider { border-color: var(--header-border); }

/* Panels outside the header: same white card */
.dropdown-menu {
    background: var(--hm-surface); border: 1px solid var(--hm-hairline);
    border-radius: var(--hm-r-md); box-shadow: var(--hm-sh-2); padding: .4rem;
}
.dropdown-item { border-radius: 8px; color: var(--hm-fg); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--hm-tile); color: var(--hm-brand-700); }

/* 4b. Top Navigation layout "Masthead" -----------------------------------------
   Masthead is a `standalone` layout: _TopMenuNav loads only its own stylesheet,
   after this file. Its look is driven by custom properties (--paper, --ink,
   --accent …), so most of the re-skin is re-pointing those at the brand; the
   [data-tm] attribute (set by _TopMenuNav) scopes every rule to Masthead and
   gives it the specificity to win over the layout's later-loading CSS.
   Masthead's editorial fonts (Assistant / Frank Ruhl Libre / IBM Plex Mono)
   are replaced by the site family, so the header and page share one voice.
   The token block names the element class as well as [data-tm]: Masthead
   declares these on .wsmainfull/.wsmobileheader/.headtoppart themselves, so a
   bare attribute selector ties on specificity and loses to the later file. */
.wsmainfull[data-tm="Layout-15-Masthead"],
.wsmobileheader[data-tm="Layout-15-Masthead"],
.headtoppart[data-tm="Layout-15-Masthead"] {
    --paper:    var(--hm-glass);
    --panel:    #FFFFFF;
    --ink:      var(--hm-brand-900);
    --ink-soft: var(--hm-muted);
    --line:     var(--hm-brand-100);
    --accent:   var(--hm-brand-700);
    --bar-h:    76px;
    --mh:       64px;
    --font:     var(--font-base);
    --font-d:   var(--font-base);
    --font-m:   var(--font-base);
}

/* Notice strip (phone / socials) — a slim brand bar above the white menu.
   Only renders when Admin → Settings has a phone or a social link. */
.headtoppart[data-tm="Layout-15-Masthead"] { background: var(--hm-brand-700); background-image: none; border-bottom: 0; }
.headtoppart[data-tm="Layout-15-Masthead"] a { color: rgba(255,255,255,.88); font-size: .875rem; }
.headtoppart[data-tm="Layout-15-Masthead"] a:hover,
.headtoppart[data-tm="Layout-15-Masthead"] a:focus-visible { color: #fff; }
/* No phone on desktop — the number is for tapping, and phones get the header's call button
   (the strip itself is already hidden under 992px). With no social links left to show, the
   strip would be an empty brand band, so it goes too. */
@media (min-width: 992px) {
    .headtoppart[data-tm="Layout-15-Masthead"] .address { display: none; }
    .headtoppart[data-tm="Layout-15-Masthead"]:not(:has(.headertopright a)) { display: none; }
}

/* The bar: white glass, sticky, hairline until scrolled, then a soft shadow.
   The blur is desktop-only on purpose: backdrop-filter makes an element the
   containing block for its position:fixed descendants, and below 992px the
   drawer (.wsmenu, fixed, inset 0) lives inside .wsmainfull — blurring the bar
   there pinned the drawer to a zero-height box and let the page paint over it. */
.wsmainfull[data-tm="Layout-15-Masthead"] { transition: box-shadow var(--hm-dur) var(--hm-ease-out); }
.hm-scrolled .wsmainfull[data-tm="Layout-15-Masthead"] { box-shadow: 0 10px 30px -12px rgba(29,42,64,.22); }
[data-tm="Layout-15-Masthead"] .desktoplogo a { font-weight: 700; font-size: 1.375rem; letter-spacing: -.01em; }
[data-tm="Layout-15-Masthead"] .desktoplogo img { max-height: 48px; }

@media only screen and (min-width: 992px) {
    .wsmainfull[data-tm="Layout-15-Masthead"] {
        position: sticky; top: 0; z-index: 1030;
        -webkit-backdrop-filter: saturate(180%) blur(16px);
                backdrop-filter: saturate(180%) blur(16px);
    }

    /* Triggers: navy ink at medium weight (600 at this size reads heavy in
       Hebrew); hover shifts to the brand colour. Masthead's own rules still
       size them down as the item count grows, so eleven items fit one row. */
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > a {
        font-weight: 500; color: var(--ink);
        transition: color var(--hm-dur-fast) var(--hm-ease-out);
    }
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > a:hover,
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li:hover > a,
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li:focus-within > a { color: var(--hm-brand-700); }
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > a.active { color: var(--hm-brand-700); font-weight: 600; }
    /* The wipe-in underline: light brand on hover, full brand on the current page. */
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > a:after {
        height: 3px; border-radius: 3px 3px 0 0; background: var(--hm-brand-300);
        transition: transform var(--hm-dur) var(--hm-spring), background-color var(--hm-dur-fast) linear;
    }
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > a.active:after { background: var(--hm-brand-700); }
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li:hover > a .wsarrow:after,
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li:focus-within > a .wsarrow:after { border-color: var(--hm-brand-700); }

    /* Panels: white card hanging from the bar, navy rule along the top edge,
       rounded lower corners, brand-tinted shadow. Masthead's dashed "stitch"
       rule is retired — the navy edge does that job. */
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > ul.sub-menu,
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > .wsmegamenu {
        border: 1px solid var(--line); border-top: 2px solid var(--hm-brand-700);
        border-radius: 0 0 var(--hm-r-md) var(--hm-r-md);
        box-shadow: var(--hm-sh-3);
        transition: opacity .2s var(--hm-ease-out), transform var(--hm-dur) var(--hm-spring), visibility .2s;
    }
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > ul.sub-menu { padding: 10px; }
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > .wsmegamenu { padding: 14px; }
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > ul.sub-menu:before,
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > .wsmegamenu:before { display: none; }
    [data-tm="Layout-15-Masthead"] .wsmenu .wsmenu-list li ul.sub-menu li > a,
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > .wsmegamenu .megacollink li a {
        font-size: .9375rem; font-weight: 500; padding: 10px 14px; border-radius: 8px;
    }
    [data-tm="Layout-15-Masthead"] .wsmenu .wsmenu-list li ul.sub-menu li > a:hover,
    [data-tm="Layout-15-Masthead"] .wsmenu .wsmenu-list li ul.sub-menu li > a:focus-visible,
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > .wsmegamenu .megacollink li a:hover,
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > .wsmegamenu .megacollink li a:focus-visible {
        background: var(--hm-brand-50); color: var(--hm-brand-700);
    }
    [data-tm="Layout-15-Masthead"] .wsmenu .wsmenu-list li ul.sub-menu li > a.active,
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > .wsmegamenu .megacollink li a.active {
        background: var(--hm-brand-50); font-weight: 600;
    }
    [data-tm="Layout-15-Masthead"] .topmenusearch input {
        height: 40px; border: 1px solid var(--line); border-radius: var(--hm-r-pill);
        background: var(--hm-brand-50); padding-inline: 16px;
    }
    [data-tm="Layout-15-Masthead"] .topmenusearch input:focus { background: #fff; border-color: var(--hm-brand-500); box-shadow: 0 0 0 3px var(--hm-brand-100); }
}

@media only screen and (max-width: 991px) {
    /* Mobile bar: white, the logo a touch larger, a 44px burger. */
    [data-tm="Layout-15-Masthead"].wsmobileheader {
        -webkit-backdrop-filter: saturate(180%) blur(16px);
                backdrop-filter: saturate(180%) blur(16px);
    }
    .hm-scrolled [data-tm="Layout-15-Masthead"].wsmobileheader { box-shadow: 0 8px 24px -12px rgba(29,42,64,.25); }
    [data-tm="Layout-15-Masthead"] .smllogo img { max-height: 42px; }
    /* Menu button at the reading start, logo at the far end (left in Hebrew,
       right in English), the optional call button beside the menu button. The
       markup order is burger → logo → call, so the logo is moved by `order`. */
    [data-tm="Layout-15-Masthead"] .callusbtn { order: 1; margin-inline-start: 0; }
    [data-tm="Layout-15-Masthead"] .smllogo   { order: 2; margin-inline-start: auto; }
    [data-tm="Layout-15-Masthead"] .wsanimated-arrow {
        width: 44px; height: 44px; border-radius: var(--hm-r-sm); border-color: var(--line);
        transition: background-color var(--hm-dur-fast) linear;
    }
    [data-tm="Layout-15-Masthead"] .wsanimated-arrow:active { background: var(--hm-brand-50); }
    [data-tm="Layout-15-Masthead"] .wsanimated-arrow span,
    [data-tm="Layout-15-Masthead"] .wsanimated-arrow span:before,
    [data-tm="Layout-15-Masthead"] .wsanimated-arrow span:after { inset-inline-start: 12px; width: 20px; height: 2px; border-radius: 2px; }
    [data-tm="Layout-15-Masthead"] .wsanimated-arrow span:before,
    [data-tm="Layout-15-Masthead"] .wsanimated-arrow span:after { inset-inline-start: 0; }
    [data-tm="Layout-15-Masthead"] .wsanimated-arrow span { top: 21px; }
    [data-tm="Layout-15-Masthead"] .callusbtn { color: var(--hm-brand-700); }

    /* Drawer: white sheet, brand-tinted scrim, generous rows. The drawer is
       the same element as the desktop nav, so these sit under max-width. */
    [data-tm="Layout-15-Masthead"] .overlapblackbg { background: rgba(29,42,64,.45); }
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list {
        width: min(340px, 88vw); margin-inline-start: calc(-1 * min(340px, 88vw));
        padding: 8px 20px 32px; box-shadow: 0 0 40px rgba(29,42,64,.18);
        transition: margin-inline-start .4s var(--hm-spring);
    }
    .wsactive [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list { margin-inline-start: 0; }
    /* Rows: 8px padding over the 27px line → 44px, the minimum tap height
       (the base 15px gave 57px rows and a drawer that scrolled past the fold).
       The accordion chevron's hit box shrinks to the row and stays centred. */
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > a { font-size: 1.0625rem; font-weight: 500; padding-block: 8px; }
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > :is(.wsmenu-click, .wsmenu-click02) { height: 43px; }
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > :is(.wsmenu-click, .wsmenu-click02) .wsmenu-arrow { top: 17px; }
    [data-tm="Layout-15-Masthead"] .wsmenu > .wsmenu-list > li > a.active { font-weight: 600; }
    [data-tm="Layout-15-Masthead"] .wsmenu .wsmenu-list li ul.sub-menu li > a,
    [data-tm="Layout-15-Masthead"] .wsmenu .wsmegamenu .megacollink li a {
        font-size: 1rem; color: var(--hm-fg-2); border-inline-start: 2px solid var(--hm-brand-100);
        padding-block: 7px;   /* base 10px left sub-rows looser than the 44px top rows */
    }
    [data-tm="Layout-15-Masthead"] .wsmenu .wsmenu-list li ul.sub-menu li > a.active,
    [data-tm="Layout-15-Masthead"] .wsmenu .wsmegamenu .megacollink li a.active { border-inline-start-color: var(--hm-brand-700); }
}

[data-tm="Layout-15-Masthead"] :focus-visible { outline-color: var(--hm-ring); }

/* Masthead under accessibility preferences */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    .wsmainfull[data-tm="Layout-15-Masthead"], .wsmobileheader[data-tm="Layout-15-Masthead"] { --paper: #FFFFFF; }
    .wsmainfull[data-tm="Layout-15-Masthead"], [data-tm="Layout-15-Masthead"].wsmobileheader {
        -webkit-backdrop-filter: none; backdrop-filter: none;
    }
}
@media (prefers-contrast: more) {
    .wsmainfull[data-tm="Layout-15-Masthead"], .wsmobileheader[data-tm="Layout-15-Masthead"] { --line: var(--hm-brand-400); --ink-soft: var(--hm-brand-800); }
}

/* Header search toggle (_TopMenuNav, opted in by _Header.cshtml): a round icon
   button after the last menu item — and in the mobile bar beside the menu
   button — that opens a search bar under the header. */
.tm-search-toggle {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--hm-fg); font-size: 1.125rem; cursor: pointer;
    transition: background-color var(--hm-dur-fast) linear, color var(--hm-dur-fast) linear;
}
.tm-search-toggle:hover, .tm-search-toggle[aria-expanded="true"] { background: var(--hm-brand-50); color: var(--hm-brand-700); }
.tm-search-toggle:active { background: var(--hm-brand-100); }
.tm-search-item { display: flex; align-items: center; padding-inline: 4px; }
@media only screen and (max-width: 991px) {
    .wsmenu .tm-search-item { display: none; }              /* the mobile bar has its own */
    .tm-search-toggle--m { order: 1; width: 44px; height: 44px; }
}

.tm-search-panel {
    border-top: 1px solid var(--hm-hairline); background: var(--hm-surface);
    padding: 1rem;
    animation: tm-search-in var(--hm-dur-fast) var(--hm-ease-out);
}
@keyframes tm-search-in { from { opacity: 0; transform: translateY(-6px); } }
.tm-search-form { display: flex; align-items: center; gap: .5rem; max-width: 48rem; margin-inline: auto; }
.tm-search-form input {
    flex: 1 1 auto; min-width: 0; height: 48px; padding-inline: 1.25rem;
    border: 1px solid var(--hm-brand-200); border-radius: var(--hm-r-pill);
    background: var(--hm-brand-50); color: var(--hm-fg); font: inherit; font-size: 1rem; /* 16px: no iOS focus zoom */
}
.tm-search-form input::placeholder { color: var(--hm-muted); }
.tm-search-form input:focus { outline: 0; background: #fff; border-color: var(--hm-brand-500); box-shadow: 0 0 0 3px var(--hm-brand-100); }
.tm-search-submit {
    display: inline-flex; align-items: center; gap: .45rem; flex: none;
    height: 48px; padding-inline: 1.5rem; border: 0; border-radius: var(--hm-r-pill);
    background: var(--hm-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
    transition: background-color var(--hm-dur-fast) linear;
}
.tm-search-submit:hover { background: var(--hm-accent-hover); }
.tm-search-submit:active { background: var(--hm-accent-press); }
.tm-search-close {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--hm-muted); cursor: pointer;
}
.tm-search-close:hover { background: var(--hm-brand-50); color: var(--hm-fg); }
@media (max-width: 575.98px) {
    .tm-search-submit span { display: none; }               /* icon only on phones */
    .tm-search-submit { width: 48px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .tm-search-panel { animation-name: tm-search-fade; }
    @keyframes tm-search-fade { from { opacity: 0; } }
}

/* ── 5. Buttons — pills that answer on touch-down ─────────────────────────
   The press state is the feedback: an instant scale-down on :active, released
   with the spring curve. No hover lift (hover doesn't exist on touch, and a
   moving target is harder to hit). */
.btn {
    border-radius: var(--hm-r-pill); font-weight: 500; letter-spacing: -.005em;
    padding: .6rem 1.35rem;
    transition: background-color var(--hm-dur-fast) var(--hm-ease-out),
                color var(--hm-dur-fast) var(--hm-ease-out),
                border-color var(--hm-dur-fast) var(--hm-ease-out),
                box-shadow var(--hm-dur-fast) var(--hm-ease-out),
                scale var(--hm-dur) var(--hm-spring);
}
.btn:active { scale: .97; transition-duration: var(--hm-press); }
.btn-sm { padding: .4rem 1rem; font-size: .875rem; }
.btn-lg { padding: .8rem 1.75rem; font-size: 1.0625rem; }

.btn-primary {
    background: var(--hm-accent) !important; border: 1px solid var(--hm-accent) !important; color: #fff !important;
}
.btn-primary:hover { background: var(--hm-accent-hover) !important; border-color: var(--hm-accent-hover) !important; text-decoration: none; }
.btn-primary:active { background: var(--hm-accent-press) !important; }

.btn-outline-primary {
    color: var(--hm-link) !important; border: 1px solid var(--hm-accent) !important; background: transparent !important;
}
.btn-outline-primary:hover { background: var(--hm-accent) !important; color: #fff !important; text-decoration: none; }

.btn-secondary, .btn-light {
    background: var(--hm-tile) !important; color: var(--hm-fg) !important; border: 1px solid transparent !important;
}
.btn-secondary:hover, .btn-light:hover { background: var(--hm-brand-100) !important; text-decoration: none; }
.btn-outline-secondary {
    color: var(--hm-fg) !important; border: 1px solid var(--hm-hairline) !important; background: transparent !important;
}
.btn-outline-secondary:hover { background: var(--hm-tile) !important; border-color: var(--hm-brand-200) !important; text-decoration: none; }
.btn-dark { background: var(--hm-brand-900) !important; border-color: var(--hm-brand-900) !important; color: #fff !important; }

/* Text link with chevron: <a class="hm-more" href="…">Learn more</a> */
.hm-more { font-weight: 400; white-space: nowrap; }
.hm-more::after { content: "\203A"; display: inline-block; margin-inline-start: .3em; translate: 0 -.04em; }
[dir="rtl"] .hm-more::after { content: "\2039"; }

/* ── 6. Cards & surfaces — tiles, not boxes ───────────────────────────────
   Space and a soft shadow separate a tile from the canvas; no border. A
   linked card responds to press like a button. */
.card {
    background: var(--hm-surface) !important; border: 0 !important;
    border-radius: var(--hm-r-lg) !important; color: var(--hm-fg);
    box-shadow: var(--hm-sh-1); overflow: hidden;
    transition: box-shadow var(--hm-dur) var(--hm-spring), scale var(--hm-dur) var(--hm-spring);
}
.card:hover { box-shadow: var(--hm-sh-2); }
a.card:active, .card:has(> a.stretched-link):active, .card:has(.stretched-link:active) { scale: .985; transition-duration: var(--hm-press); }
.card-header, .card-footer { background: transparent !important; border-color: var(--hm-hairline) !important; }
.card-title { letter-spacing: -.01em; }
.card-img-top { border-radius: 0; }
.list-group { border-radius: var(--hm-r-md); }
.list-group-item { background: var(--hm-surface) !important; color: var(--hm-fg) !important; border-color: var(--hm-hairline) !important; }
.list-group-item-action:hover { background: var(--hm-tile) !important; }

/* Alternate band: <section class="hm-band">…</section> */
.hm-band { background: var(--hm-tile); padding-block: clamp(3rem, 6vw, 5.5rem); }

/* ── 7. Forms ───────────────────────────────────────────────────────────── */
.form-control, .form-select {
    background: var(--hm-surface) !important; color: var(--hm-fg) !important;
    border: 1px solid var(--hm-hairline) !important; border-radius: var(--hm-r-md);
    min-height: 2.9rem; font-size: 1.0625rem; /* ≥16px — stops iOS zooming on focus */
    transition: border-color var(--hm-dur-fast) var(--hm-ease-out), box-shadow var(--hm-dur-fast) var(--hm-ease-out);
}
.form-control-sm { font-size: .875rem; min-height: 2.2rem; }
.form-control::placeholder { color: var(--hm-muted) !important; opacity: .85; }
.form-control:focus, .form-select:focus {
    border-color: var(--hm-brand-500) !important; box-shadow: 0 0 0 4px var(--hm-brand-100) !important;
}
.form-check-input { border-color: var(--hm-hairline); }
.form-check-input:checked { background-color: var(--hm-accent); border-color: var(--hm-accent); }
.form-check-input:focus { box-shadow: 0 0 0 4px var(--hm-brand-100); }
.form-label, .col-form-label { color: var(--hm-fg); font-weight: 500; font-size: .9375rem; }
.form-text { color: var(--hm-muted); }
/* Phone and email fields are typed left-to-right, so browsers lay them out LTR —
   which pushed their Hebrew placeholder to the left edge of an RTL form. Keep
   the LTR typing, align with the other fields. */
[dir="rtl"] input:is([type="tel"], [type="email"], [type="url"]) { text-align: right; }
.input-group-text { background: var(--hm-tile); color: var(--hm-muted); border-color: var(--hm-hairline); }

/* Input groups read as one pill split in two: rounded at the outer ends, square
   where the pieces meet. Bootstrap's own resets are physical (written for LTR)
   and the theme's pill .btn rounded the button on both ends, so in RTL the
   rounding landed on the wrong sides. Logical corners and margins fix both
   directions. "Last" = the last control, ignoring trailing feedback text. */
.input-group > :is(.form-control, .form-select, .btn, .input-group-text) { border-radius: 0 !important; }
.input-group > :is(.form-control, .form-select, .btn, .input-group-text):first-child {
    border-start-start-radius: var(--hm-r-pill) !important;
    border-end-start-radius:   var(--hm-r-pill) !important;
}
.input-group > :is(.form-control, .form-select, .btn, .input-group-text):not(:has(~ :is(.form-control, .form-select, .btn, .input-group-text))) {
    border-start-end-radius: var(--hm-r-pill) !important;
    border-end-end-radius:   var(--hm-r-pill) !important;
}
.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    margin-left: 0 !important; margin-inline-start: calc(var(--bs-border-width, 1px) * -1) !important;
}
.input-group > .form-control { padding-inline: 1.25rem; }
.input-group > .btn { padding-inline: 1.5rem; }

/* Icon + label buttons: the gap comes from the button, not from the icon's
   physical me-1 / ms-1 margin utility, which sat on the wrong side in RTL and
   glued the icon to the word. */
.btn:has(> .bi) { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.btn > .bi { margin: 0 !important; }
.invalid-feedback { color: #B3261E; }

/* ── 8. Badges, alerts, tables, misc ───────────────────────────────────── */
.badge { border-radius: var(--hm-r-pill); font-weight: 600; letter-spacing: .01em; padding: .35em .7em; }
.badge.bg-primary { background: var(--hm-accent) !important; }
.alert { border-radius: var(--hm-r-md); border: 0; }
.alert-success { background: #EAF8EE; color: #1B6E34; }
.alert-danger  { background: #FDEDED; color: #B3261E; }
.alert-warning { background: #FFF5E0; color: #8A5300; }
.alert-info    { background: var(--hm-brand-50); color: var(--hm-brand-800); }
.alert-light   { background: var(--hm-tile); color: var(--hm-fg); }
.table { --bs-table-bg: transparent; color: var(--hm-fg); }
.table > :not(caption) > * > * { border-color: var(--hm-hairline); padding-block: .75rem; }
.table thead th { color: var(--hm-muted); font-size: .875rem; font-weight: 600; letter-spacing: .01em; }
.table-light, .table thead.table-light th { background: var(--hm-tile) !important; }
hr { border-color: var(--hm-hairline); opacity: 1; }
.breadcrumb { font-size: .875rem; }
.breadcrumb-item a { color: var(--hm-muted); }
.pagination .page-link { border: 0; border-radius: var(--hm-r-sm) !important; color: var(--hm-link); margin-inline: 2px; }
.pagination .active > .page-link { background: var(--hm-brand-700); color: #fff; }

/* ── 9. CMS content — long-form reading ────────────────────────────────── */
.cms-content, .fw-content, .lp-content { color: var(--hm-fg-2); line-height: 1.75; }
/* The homepage body (Index view: <div class="cms-homepage-content">) is full-bleed and
   keeps its own sizing, but takes the same text and link colours as every other page —
   it is added to the colour rules below, and only to those. */
.cms-homepage-content { color: var(--hm-fg-2); }
/* An article page (CmsPage view: <article class="container"><div class="cms-content">)
   ran its text the full container width — ~180 characters a line at 1440px.
   Hold plain articles to a ~70-character measure, centred. Builder pages
   (.is-container) lay out their own columns and are left alone. */
/* Only prose gets the narrow measure. Content that brings its own layout — a
   Bootstrap grid, a form, a table, an embed — keeps the full container, or a
   two-column page (form + contact details) is crushed into 736px. */
/* 48rem, not 46: at 46 a typical section heading ("חלק שני – תכנון המס בפרישה
   וניצול אופטימלי של הטבות המס:", 754px at the h2 size) missed one line by 18px. */
article > .cms-content:not(.is-container):not(:has(.row, form, table, iframe)) { max-width: 88%; margin-inline: auto; }

/* Heading utility classes win over the content scale: `<h2 class="h4">` asks for
   an h4-sized heading on purpose (the form widget's title does), but
   `.cms-content h2` outranked Bootstrap's `.h4`. */
.cms-content .h1 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.375rem); }
.cms-content .h2 { font-size: clamp(1.375rem, 1.2rem + .8vw, 1.75rem); }
.cms-content .h3 { font-size: clamp(1.1875rem, 1.1rem + .4vw, 1.375rem); }
.cms-content .h4 { font-size: 1.375rem; margin-top: 0; }
.cms-content .h5 { font-size: 1.125rem; margin-top: 0; }
.cms-content .h6 { font-size: 1rem; margin-top: 0; }

/* Narrow side columns in imported content (col-*-3 / col-*-4 beside a main
   column) hold contact details, hours and addresses — but the legacy markup
   sets every line as an <h2>, so at heading size a ~250px column broke
   "טלפון: 03-6026859" across three lines. Inside such a column headings are
   read as an info card: body-sized lines on a soft brand tile, with the empty
   <p>&nbsp;</p> spacers turned into quiet group dividers. */
/* The tile is drawn by ::before, inset by the grid gutter: painting the column's
   own background would fill its gutter padding too and run past the page edge
   (the row's negative margins) on phones. */
.cms-content .row > :is(.col-md-3, .col-md-4, .col-sm-3, .col-sm-4, .col-lg-3, .col-lg-4):has(> h2, > h3) {
    --hm-gx: calc(var(--bs-gutter-x, 1.5rem) * .5);
    position: relative; isolation: isolate; align-self: flex-start;
    padding: 1.5rem calc(var(--hm-gx) + 1.25rem) 1.25rem; margin-block: 1.5rem;
}
.cms-content .row > :is(.col-md-3, .col-md-4, .col-sm-3, .col-sm-4, .col-lg-3, .col-lg-4):has(> h2, > h3)::before {
    content: ""; position: absolute; inset: 0 var(--hm-gx); z-index: -1;
    background: var(--hm-tile); border-radius: var(--hm-r-lg);
}
.cms-content .row > :is(.col-md-3, .col-md-4, .col-sm-3, .col-sm-4, .col-lg-3, .col-lg-4) > :is(h2, h3, h4) {
    font-size: 1rem; font-weight: 600; line-height: 1.55; letter-spacing: 0;
    color: var(--hm-fg); margin: 0 0 .2rem; text-wrap: pretty;
}
/* Blank spacer paragraphs (<p>&nbsp;</p>, tagged .hm-blank by _Layout's script —
   CSS alone can't tell &nbsp; from text). In prose they shrink to a modest
   gap; inside an info card they become a hairline between groups. */
.cms-content p.hm-blank { margin: 0; height: .75rem; }
.cms-content .row > :is(.col-md-3, .col-md-4, .col-sm-3, .col-sm-4, .col-lg-3, .col-lg-4) > p.hm-blank {
    height: 0; margin: .7rem 0; border-top: 1px solid var(--hm-brand-100); overflow: hidden;
}
.cms-content .row > :is(.col-md-3, .col-md-4, .col-sm-3, .col-sm-4, .col-lg-3, .col-lg-4) > p.hm-blank:last-child { display: none; }

/* Forms inside content (the CMS form widget): labels centred on their fields. */
.cms-content .wc-contact-form .col-form-label { padding-block: 0 .35rem; line-height: 1.4; }
@media (min-width: 576px) {   /* side-by-side: centre on the 2.9rem field */
    .cms-content .wc-contact-form .col-form-label { padding-block: .75rem; }
}
.cms-content .wc-contact-form .h4 { margin-bottom: 1.25rem !important; }

/* Contact layout — a form column beside a details card (צור קשר: col-md-9 form + col-md-3
   card). The form widget stops at 640px, so a 9/12 column left ~340px of empty space between
   it and the card. The form column now shrinks to the form and the card sits right beside it;
   the blank spacer above and the form's own my-4 margin go, so the form starts under the title. */
.cms-content > p.hm-blank:has(+ .row .wc-contact-form) { display: none; }
.cms-content [class*="col-"] > .wc-contact-form { margin-block: 0 !important; }
@media (min-width: 992px) {
    .cms-content .row:has(> [class*="col-"] > .wc-contact-form) { --bs-gutter-x: 3rem; align-items: flex-start; }
    .cms-content .row > [class*="col-"]:has(> .wc-contact-form) { flex: 0 1 auto; width: calc(640px + var(--bs-gutter-x)); max-width: 70%; }
    .cms-content .row:has(> [class*="col-"] > .wc-contact-form) > :is(.col-md-3, .col-md-4) { margin-block: 0; }
}
/* Below that the card was a ~190px sliver that broke the phone numbers mid-digit: stack it
   under the form instead, at the form's width. */
@media (max-width: 991.98px) {
    .cms-content .row:has(> [class*="col-"] > .wc-contact-form) > [class*="col-"] { flex: 0 0 auto; width: 100%; max-width: calc(640px + var(--bs-gutter-x, 1.5rem)); }
}
.cms-content .wc-contact-form .btn { min-height: 2.9rem; padding-inline: 1.75rem; }
.cms-content p { margin-bottom: 1.1em; }
.cms-content ul, .cms-content ol { padding-inline-start: 1.4em; }
.cms-content li { margin-bottom: .4em; }
.cms-content li::marker, .cms-homepage-content li::marker { color: var(--hm-brand-400); }
.cms-content h1, .cms-content h2, .cms-content h3, .cms-content h4,
.cms-homepage-content :is(h1, h2, h3, h4),
.lp-content h2, .lp-content h3 { color: var(--hm-fg); }
/* Content heading scale — sized for a reading page, not a hero, on a ~1.3
   ratio over the 17px body:  h1 28→38 · h2 22→28 · h3 19→22 · h4 18.
   (The global h1 scale, up to 52px, stays for heroes and landing titles.) */
.cms-content h1 {
    font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.375rem); font-weight: 700; line-height: 1.2;
    margin-top: 0; margin-bottom: 1rem;
}
.cms-content h2 { font-size: clamp(1.375rem, 1.2rem + .8vw, 1.75rem); line-height: 1.3; margin-top: 2.25rem; margin-bottom: .75rem; }
.cms-content h3 { font-size: clamp(1.1875rem, 1.1rem + .4vw, 1.375rem); line-height: 1.35; margin-top: 1.75rem; margin-bottom: .5rem; }
.cms-content h4 { font-size: 1.125rem; line-height: 1.4; margin-top: 1.5rem; margin-bottom: .5rem; }
/* Imported pages often use a second <h1> as a section heading. Only the first
   reads as the page title; later ones take the section (h2) size. */
.cms-content h1 ~ h1 { font-size: clamp(1.375rem, 1.2rem + .8vw, 1.75rem); line-height: 1.3; margin-top: 2.25rem; margin-bottom: .75rem; }
/* Imported link lists wrap some items in a heading — <li><h1><strong><a>…</a>
   </strong></h1></li> — beside plain <li><strong><a>…</a></strong></li> siblings,
   so half a list rendered at 38px. A heading inside a list item is just
   list text: it takes the item's size and spacing, bolded the way the siblings'
   <strong> is (the rule below keeps an inner <strong> from going heavier). */
.cms-content li > :is(h1, h2, h3, h4, h5, h6) {
    font: inherit; font-weight: bolder; color: inherit; letter-spacing: inherit; text-wrap: inherit;
    margin: 0;
}
/* Link-list items (a document link per <li>, bare or wrapped in <strong>/<h1>)
   run 30% smaller with a tight gap — they're an index to scan, not prose.
   Imported pages also split one list into several <ul>s with an empty <p>
   between them; the blank collapses and the lists close up to the item gap. */
.cms-content { --hm-linklist-fs: .74375rem; --hm-linklist-gap: .15em; }   /* 70% of the 17px body */
.cms-content li:has(> a, > :is(strong, b) > a, > :is(h1, h2, h3, h4, h5, h6) a) {
    font-size: var(--hm-linklist-fs); margin-bottom: var(--hm-linklist-gap);
}
.cms-content :is(ul, ol):has(+ :is(ul, ol), + p.hm-blank + :is(ul, ol)) { margin-bottom: var(--hm-linklist-gap); }
.cms-content :is(ul, ol) + p.hm-blank:has(+ :is(ul, ol)) { display: none; }
/* Hub pages build the same index from sibling headings instead of a list —
   <h1><a>מס הכנסה</a> - description</h1> × N under the page title. A heading
   that opens with a link is one of those items: it takes the list item's size,
   weight, gap and circle bullet, so every index page reads alike. */
.cms-content :is(h1, h2, h3, h4, h5, h6):not(li > *):has(> a:first-child, > :is(strong, b):first-child > a:first-child) {
    display: list-item; list-style: circle outside; margin: 0 0 var(--hm-linklist-gap); margin-inline-start: 1.4em;
    font-size: 1.0625rem; font-weight: 700; line-height: inherit; letter-spacing: normal;   /* body size, like link-list <li>s */
    color: var(--hm-fg-2);
}
.cms-content :is(h1, h2, h3, h4, h5, h6):not(li > *):has(> a:first-child, > :is(strong, b):first-child > a:first-child)::marker { color: var(--hm-brand-400); }

/* One compact scale for every imported page (builder pages, .is-container, keep
   their own designed sections). Prose, links and list items all share the
   link-list size, so an article, an index and a hub page read as one site:
   title 22 · section 16 · sub 14 · minor 13 · text ~12, with gaps to match. */
.cms-content:not(.is-container) { font-size: var(--hm-linklist-fs); line-height: 1.75; }
.cms-content:not(.is-container) p { line-height: inherit; margin-bottom: .6em; }
/* …except paragraphs and link-list items, which read at the body size the homepage uses
   (17px). A <p> inside a list item stays with its list. rem, not em, so nested lists
   don't compound. */
.cms-content:not(.is-container) p:not(li p),
.cms-content:not(.is-container) li:has(a) { font-size: 1.0625rem; }
.cms-content:not(.is-container) p.hm-blank { height: .4rem; }
.cms-content:not(.is-container) li { margin-bottom: var(--hm-linklist-gap); }
.cms-content:not(.is-container) h1:not(li > *) { font-size: 1.375rem; line-height: 1.25; margin: 0 0 .75rem; }
.cms-content:not(.is-container) :is(h1 ~ h1, h2):not(li > *) { font-size: 1rem; line-height: 1.35; margin: 1.25rem 0 .4rem; }
.cms-content:not(.is-container) h3:not(li > *) { font-size: .875rem; line-height: 1.4; margin: 1rem 0 .35rem; }
.cms-content:not(.is-container) :is(h4, h5, h6):not(li > *) { font-size: .8125rem; line-height: 1.4; margin: .9rem 0 .3rem; }
/* Info-card lines (phone, hours, address) read at the body size, like paragraphs. */
.cms-content:not(.is-container) .row > :is(.col-md-3, .col-md-4, .col-sm-3, .col-sm-4, .col-lg-3, .col-lg-4) > :is(h2, h3, h4) { font-size: 1.0625rem; }
.cms-content:not(.is-container) blockquote { font-size: .9375rem; margin-block: 1.25rem; }

/* Imported headings carry the old site's inline decoration —
   <h1><span style="text-decoration: underline"><strong>…</strong>&nbsp;</span></h1>.
   An underline on a heading reads as a link (and here ran on past the text onto
   a trailing &nbsp;), and <strong> inside an already-bold heading jumped Heebo
   to its heaviest weight. Headings take their look from the theme instead. */
.cms-content :is(h1, h2, h3, h4, h5, h6) :is([style*="underline"], u) { text-decoration: none !important; }
.cms-content :is(h1, h2, h3, h4, h5, h6) :is(strong, b) { font-weight: inherit; }
/* …and inline `text-align: justify`, which on a two-line heading stretched the
   first line into four words spread across the column. Headings sit flush to
   the reading edge like every other page's. */
.cms-content :is(h1, h2, h3, h4, h5, h6)[style*="justify"] { text-align: start !important; }
:is(.cms-content, .cms-homepage-content) :is(h1, h2, h3, h4, h5, h6) a { text-decoration: none; }
:is(.cms-content, .cms-homepage-content) :is(h1, h2, h3, h4, h5, h6) a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
:is(.cms-content, .cms-homepage-content) :is(p, li) { color: var(--hm-fg-2); }
/* Content links: the brand navy (#31466A) sat at 1.2:1 against the #2F3A4D body text, so
   links read as plain text. A clear blue (6.4:1 on white — AA even at the 12px content size)
   plus a light underline marks them; colour alone is too close to the text (1.8:1) for
   readers who can't tell the hues apart. Hover darkens it and makes the underline solid.
   .btn links keep their button look. */
.cms-content, .cms-homepage-content { --hm-content-link: #0B57D0; --hm-content-link-hover: #0842A0; }
:is(.cms-content, .cms-homepage-content) a:not(.btn) {
    color: var(--hm-content-link);
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em;
    text-decoration-color: color-mix(in srgb, var(--hm-content-link) 35%, transparent);
    transition: color .15s linear, text-decoration-color .15s linear;
}
:is(.cms-content, .cms-homepage-content) a:not(.btn):is(:hover, :focus-visible) {
    color: var(--hm-content-link-hover); text-decoration-color: currentColor;
}
.cms-content blockquote {
    border: 0; border-inline-start: 3px solid var(--hm-brand-700); margin-block: 2rem; padding-inline-start: 1.25rem;
    font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); line-height: 1.4; font-weight: 600;
    letter-spacing: -.01em; color: var(--hm-fg);
}
.cms-content code { background: var(--hm-tile); color: var(--hm-brand-900); border-radius: 6px; padding: .1em .35em; font-size: .9em; }
.cms-content pre { background: var(--hm-tile); color: var(--hm-brand-900); border-radius: var(--hm-r-md); padding: 1rem 1.25rem; }
.cms-content img, .lp-content img { border-radius: var(--hm-r-lg); }
.cms-content figcaption { color: var(--hm-muted); font-size: .875rem; margin-top: .5rem; }

/* Landing hero (page view): quiet tile band, big tight headline */
.lp-hero { padding: clamp(4rem, 9vw, 7rem) 1rem clamp(3rem, 7vw, 5rem) !important; }
.lp-hero h1 { font-size: clamp(2.5rem, 1.6rem + 4vw, 4.5rem) !important; font-weight: 700 !important; letter-spacing: -.03em !important; line-height: 1.05; }
[dir="rtl"] .lp-hero h1 { letter-spacing: -.01em !important; }
.lp-hero p.lead { color: var(--hm-muted); opacity: 1; }

/* ── 10. Hero slider (.cd-hero) ─────────────────────────────────────────── */
.cd-hero, .cd-hero__slider, .cd-hero__slide { background-color: var(--hm-tile) !important; }
.cd-hero__slide { color: var(--hm-fg); }
.cd-hero__content h2, .cd-hero .cd-hero__content h2 {
    color: var(--hm-brand-900) !important; font-weight: 700 !important; letter-spacing: -.025em; text-shadow: none !important;
}
.cd-hero__content p, .cd-hero .cd-hero__content p { color: var(--hm-muted) !important; text-shadow: none !important; }
.cd-hero .btn-get-started {
    background: var(--hm-accent) !important; color: #fff !important; border: 0 !important;
    border-radius: var(--hm-r-pill) !important; transition: background-color var(--hm-dur-fast) var(--hm-ease-out), scale var(--hm-dur) var(--hm-spring);
}
.cd-hero .btn-get-started:hover { background: var(--hm-accent-hover) !important; }
.cd-hero .btn-get-started:active { scale: .97; transition-duration: var(--hm-press); }
.cd-hero__nav nav ul li a { color: var(--hm-muted) !important; }
.cd-hero__nav nav ul li.cd-selected a { color: var(--hm-fg) !important; }

/* ── 11. Footer — brand, two-tone ───────────────────────────────────────────
   A consultancy-style footer in the brand navy: the CTA band sits on the
   brand colour itself (700) and the directory + legal bar on the deeper 900,
   so the step in tone does the work of a divider. Text tiers (measured):
     on 700  titles #fff 9.5:1 · text white 78% 6.5:1
     on 900  titles #fff 14.4:1 · text white 74% 8.6:1 · links white 66% 7.1:1 */
footer, .hm-footer { background: var(--hm-brand-900) !important; }
.hm-footer {
    --hm-f-fg:     #FFFFFF;
    --hm-f-text:   rgba(255,255,255,.74);
    --hm-f-dim:    rgba(255,255,255,.66);
    --hm-f-line:   rgba(255,255,255,.12);
    --hm-f-chip:   rgba(255,255,255,.07);
    --hm-f-chip-b: rgba(255,255,255,.16);
    /* Size scale — one ratio for every element so the footer reads as a quiet
       coda to the page, not a second hero. 15px text, 16px titles, controls
       on a 44px touch height, spacing on an 8px rhythm. */
    --hm-f-ctrl:   2.75rem;    /* 44px — buttons, search field */
    --hm-f-chip-s: 2rem;       /* 32px — social chips */
    --hm-f-gap:    clamp(2.5rem, 4.5vw, 3.5rem);   /* band padding, 40→56px */
    color: var(--hm-f-text); font-size: .9375rem; line-height: 1.6;
    overflow: hidden;
}
/* Without the CTA band the directory needs its own top breathing room. */
.hm-footer > .container:first-child .hm-fgrid { padding-top: var(--hm-f-gap); }
.hm-footer a { color: var(--hm-f-dim); text-decoration: none; transition: color .2s linear; }
.hm-footer a:hover, .hm-footer a:focus-visible { color: var(--hm-f-fg); text-decoration: none; }
.hm-frule { margin: 0; border: 0; border-top: 1px solid var(--hm-f-line); opacity: 1; }

/* Pill buttons. Hover inverts to white-on-dark like the original; press uses
   the theme's instant scale feedback. */
.hm-footer .hm-fbtn {
    display: inline-flex; align-items: center; gap: .45rem; min-height: var(--hm-f-ctrl);
    padding: .65rem 1.4rem; border-radius: var(--hm-r-pill);
    background: #fff; border: 1px solid #fff; color: var(--hm-brand-800);
    font-size: .9375rem; font-weight: 600; line-height: 1;
    transition: background-color .2s linear, border-color .2s linear, color .2s linear, scale var(--hm-dur) var(--hm-spring);
}
/* !important only on colour: _Head forces `footer a:hover, footer a:focus
   { color: #fff !important }` on every template, which would put white text on
   this white hover fill. Higher specificity wins the !important tie. */
.hm-footer .hm-fbtn:hover, .hm-footer .hm-fbtn:focus-visible { background: var(--hm-brand-100); border-color: var(--hm-brand-100); color: var(--hm-brand-900) !important; }
.hm-footer .hm-fbtn:focus:not(:hover):not(:focus-visible) { color: var(--hm-brand-800) !important; }
.hm-footer .hm-fbtn:active { scale: .97; transition-duration: var(--hm-press); }
.hm-footer .hm-fbtn--ghost { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.hm-footer .hm-fbtn--ghost:focus:not(:hover):not(:focus-visible) { color: #fff !important; }
.hm-footer .hm-fbtn--ghost:hover, .hm-footer .hm-fbtn--ghost:focus-visible { background: #fff; border-color: #fff; color: var(--hm-brand-800) !important; }

/* 1. CTA band — on the brand colour itself */
.hm-fcta { background: var(--hm-brand-700); padding-top: var(--hm-f-gap); --hm-f-text: rgba(255,255,255,.78); }
.hm-fcta + .container:has(> .hm-frule) { display: none; }   /* the tone change is the divider */
.hm-fcta__inner {
    position: relative; display: grid; grid-template-columns: minmax(0, 58%) minmax(0, 1fr);
    align-items: center; gap: 2rem; padding-bottom: var(--hm-f-gap);
}
.hm-fcta__title {
    color: var(--hm-f-fg); font-weight: 700; margin: 0 0 .75rem;
    font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.125rem); line-height: 1.2; letter-spacing: -.02em;
}
[dir="rtl"] .hm-fcta__title { letter-spacing: -.01em; }
.hm-fcta__text { color: var(--hm-f-text); font-size: 1rem; line-height: 1.65; margin: 0 0 1.5rem; max-width: 52ch; }
.hm-fcta__actions { display: flex; flex-wrap: wrap; gap: .625rem; }

/* Decorative dot-matrix world map: a dot grid shown through overlapping soft
   ellipses roughly where the continents sit, with a location pin over Israel.
   Pure CSS, no image. Positions are physical (left/top), not logical — a map
   doesn't mirror in RTL, so the pin mustn't either. */
.hm-fcta__map { position: relative; align-self: stretch; min-height: 12rem; width: 100%; max-width: 26rem; justify-self: end; }
.hm-fcta__map::before {
    content: ""; position: absolute; inset: -1rem 0;
    background: radial-gradient(circle, rgba(255,255,255,.3) 1px, transparent 1.4px) 0 0 / 7px 7px;
    -webkit-mask-image: var(--hm-world);
            mask-image: var(--hm-world);
}
.hm-fcta__map {
    --land: #000 0 42%, transparent 100%;   /* solid core, soft coastline */
    --hm-world:
        radial-gradient(ellipse 13% 15% at 19% 27%, var(--land)),   /* North America */
        radial-gradient(ellipse 9% 11% at 10% 20%, var(--land)),    /* Alaska / Canada */
        radial-gradient(ellipse 5% 8% at 25% 45%, var(--land)),     /* Central America */
        radial-gradient(ellipse 7% 16% at 31% 69%, var(--land)),    /* South America */
        radial-gradient(ellipse 6% 9% at 49% 23%, var(--land)),     /* Europe */
        radial-gradient(ellipse 8% 17% at 52% 56%, var(--land)),    /* Africa */
        radial-gradient(ellipse 4% 6% at 58% 39%, var(--land)),     /* Middle East */
        radial-gradient(ellipse 17% 14% at 72% 25%, var(--land)),   /* Asia */
        radial-gradient(ellipse 5% 8% at 67% 46%, var(--land)),     /* India */
        radial-gradient(ellipse 7% 9% at 81% 42%, var(--land)),     /* East Asia */
        radial-gradient(ellipse 6% 3% at 79% 60%, var(--land)),     /* Indonesia */
        radial-gradient(ellipse 7% 7% at 86% 75%, var(--land));     /* Australia */
}
.hm-fcta__pin {               /* tip of the pin sits at ~(58%, 38%) — Israel */
    position: absolute; left: calc(58% - 1rem); top: calc(38% - 2rem);
    font-size: 2rem; line-height: 1; color: #fff;
    filter: drop-shadow(0 6px 14px rgba(10,16,28,.45));
}
.hm-fcta__pin::after {          /* soft halo where the pin touches down */
    content: ""; position: absolute; left: 50%; bottom: -.25rem; width: 1.1rem; height: .32rem;
    translate: -50% 0; border-radius: 50%; background: rgba(10,16,28,.45); filter: blur(3px);
}

/* 2. Directory */
.hm-fgrid {
    display: grid; gap: 2rem 2.5rem;
    grid-template-columns: minmax(0, 1.3fr) repeat(var(--hm-fcols, 3), minmax(0, 1fr)) minmax(0, 1.3fr);
    padding-block: var(--hm-f-gap);
}
.hm-fbrand__logo {
    display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1rem;
    color: var(--hm-f-fg) !important; font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; line-height: 1;
}
.hm-fbrand__logo img { height: 32px; width: auto; border-radius: 6px; }
.hm-fbrand__text { color: var(--hm-f-text); max-width: 34ch; margin: 0 0 1.25rem; }
.hm-fsocial { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.hm-fsocial a {
    display: inline-flex; align-items: center; justify-content: center; width: var(--hm-f-chip-s); height: var(--hm-f-chip-s);
    border-radius: var(--hm-r-pill); background: var(--hm-f-chip); border: 1px solid var(--hm-f-chip-b);
    color: var(--hm-f-text); font-size: .8125rem;
    transition: background-color .2s linear, border-color .2s linear, color .2s linear, scale var(--hm-dur) var(--hm-spring);
}
.hm-fsocial a:hover, .hm-fsocial a:focus-visible { background: #fff; border-color: #fff; color: var(--hm-brand-700) !important; }
.hm-fsocial a:active { scale: .92; transition-duration: var(--hm-press); }

/* Column titles line up with the brand name beside them (both ~1rem tall),
   so the row of headings reads as one line across the grid. */
.hm-fcol__title { color: var(--hm-f-fg); font-size: 1rem; font-weight: 700; line-height: 1.25; margin: .4rem 0 1rem; }
.hm-flist { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; }
.hm-flist li { display: flex; align-items: baseline; gap: .55rem; line-height: 1.45; }
.hm-flist li::before {           /* the 4px dot bullet; brightens with its link */
    content: ""; flex: none; width: 4px; height: 4px; border-radius: 50%;
    background: currentColor; color: var(--hm-f-dim); translate: 0 -.2em; transition: color .2s linear;
}
.hm-flist li:has(a:hover, a:focus-visible)::before { color: var(--hm-f-fg); }
.hm-flist a[aria-current="page"] { color: var(--hm-f-fg); }
.hm-flist__text { color: var(--hm-f-dim); }

.hm-fsearch__text { color: var(--hm-f-text); margin: 0 0 1rem; }
.hm-fsearch__form { position: relative; }
.hm-fsearch__form input {
    width: 100%; height: var(--hm-f-ctrl); padding-block: 0; padding-inline: 1.1rem 3.25rem;
    border-radius: var(--hm-r-pill); background: rgba(255,255,255,.06);
    border: 1px solid var(--hm-f-chip-b); color: var(--hm-f-fg); font-size: 1rem; /* 16px: no iOS focus zoom */
    transition: border-color .3s linear, background-color .3s linear, box-shadow .3s linear;
    -webkit-appearance: none; appearance: none;
}
.hm-fsearch__form input::placeholder { color: var(--hm-f-dim); }
.hm-fsearch__form input::-webkit-search-cancel-button { display: none; }
.hm-fsearch__form input:focus {
    outline: none; border-color: var(--hm-brand-300); background: rgba(255,255,255,.09);
    box-shadow: 0 0 0 4px rgba(159,176,203,.25);
}
.hm-fsearch__form button {
    position: absolute; top: 50%; inset-inline-end: .25rem; translate: 0 -50%;
    width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 0;
    background: #fff; color: var(--hm-brand-700); font-size: .9375rem;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background-color .2s linear, scale var(--hm-dur) var(--hm-spring);
}
.hm-fsearch__form button:hover { background: var(--hm-brand-100); }
.hm-fsearch__form button:active { scale: .92; transition-duration: var(--hm-press); }
.hm-fsearch__form button .bi { transition: translate var(--hm-dur) var(--hm-spring); }
.hm-fsearch__form button:hover .bi { translate: 2px 0; }          /* hint in the direction of travel */
[dir="rtl"] .hm-fsearch__form button:hover .bi { translate: -2px 0; }

/* 3. Legal bar */
.hm-flegal { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.hm-flegal__copy { margin: 0; color: var(--hm-f-text); font-size: .875rem; }
.hm-flegal__copy strong { color: var(--hm-f-fg); font-weight: 500; }
.hm-flegal__sep { margin-inline: .5rem; color: var(--hm-f-dim); }
.hm-flegal__end { flex: none; display: flex; align-items: center; gap: 1.25rem; }
/* WideCommerce credit: the black mark, turned white for the dark footer and dimmed
   like the other footer links until hovered. */
.hm-fcredit { display: inline-flex; padding: .25rem; border-radius: 8px; }
.hm-fcredit img {
    display: block; width: 40px; height: auto;
    filter: brightness(0) invert(1); opacity: .66; transition: opacity .2s linear;
}
.hm-fcredit:hover img, .hm-fcredit:focus-visible img { opacity: 1; }
.hm-totop {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem; border-radius: 12px;
    background: var(--hm-f-chip); border: 1px solid var(--hm-f-chip-b); color: var(--hm-f-fg) !important; font-size: .9375rem;
    transition: background-color .2s linear, translate var(--hm-dur) var(--hm-spring), scale var(--hm-dur) var(--hm-spring);
}
.hm-totop:hover, .hm-totop:focus-visible { background: rgba(255,255,255,.14); translate: 0 -3px; }
.hm-totop:active { scale: .94; transition-duration: var(--hm-press); }

/* Tablet: brand + search span the row, link columns share the middle. */
@media (max-width: 991.98px) {
    .hm-fcta__inner { grid-template-columns: minmax(0, 1fr); }
    .hm-fcta__map { display: none; }
    .hm-fgrid { grid-template-columns: repeat(var(--hm-fcols, 3), minmax(0, 1fr)); }
    .hm-fbrand, .hm-fsearch { grid-column: 1 / -1; }
}
/* Phone: two link columns per row, everything else full width. */
@media (max-width: 575.98px) {
    .hm-fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1.25rem; }
    .hm-fcta__title { font-size: 1.375rem; }
    .hm-fcta__text { font-size: .9375rem; }
    .hm-flist { gap: .75rem; }          /* a little more room between tap targets on touch */
    .hm-flegal { padding-block: 1rem; }
    .hm-flegal__copy { font-size: .8125rem; }
    .hm-flegal__sep { display: none; }
    .hm-flegal__copy a { display: block; margin-top: .35rem; }
}

/* ── 12. Focus — a clear ring, never removed ───────────────────────────── */
:focus-visible { outline: 3px solid var(--hm-ring); outline-offset: 2px; }
.btn:focus-visible { outline: 3px solid var(--hm-ring); outline-offset: 2px; box-shadow: none; }
.hm-footer :focus-visible { outline-color: var(--hm-brand-200); }

/* ── 13. Entrance reveal (classes added by _Layout's script) ───────────────
   Gated on .hm-js so content is never hidden if the script doesn't run. A
   short rise with the critically damped curve — nothing bounces, and nothing
   on the page waits for it before it can be clicked. */
.hm-js .hm-reveal { opacity: 0; translate: 0 18px; transition: opacity .6s var(--hm-ease-out), translate .7s var(--hm-spring); }
.hm-js .hm-reveal.in { opacity: 1; translate: 0 0; }

/* ── 14. Accessibility preferences ─────────────────────────────────────── */

/* Reduced motion: keep feedback, drop movement. Reveals become a short
   cross-fade, presses change colour only, panels appear without scaling. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hm-js .hm-reveal { translate: none !important; transition: opacity .2s linear !important; }
    .btn:active, .card:active, .cd-hero .btn-get-started:active,
    .hm-footer .hm-fbtn:active, .hm-fsocial a:active, .hm-fsearch__form button:active, .hm-totop:active { scale: none !important; }
    .hm-totop:hover, .hm-totop:focus-visible, .hm-fsearch__form button:hover .bi { translate: none !important; }
    .hm-nav .dropdown-menu, .hm-nav .mega-panel { transition: opacity .15s linear; }
    @starting-style {
        .hm-nav .dropdown-menu.show, .hm-nav .mega-panel.show { scale: none; }
    }
}

/* Reduced transparency: the white glass becomes solid white. */
@media (prefers-reduced-transparency: reduce) {
    :root { --header-bg: #FFFFFF; --hm-glass: #FFFFFF; }
    .navbar.hm-nav { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Increased contrast: solid surfaces, defined edges, stronger secondary text. */
@media (prefers-contrast: more) {
    :root {
        --header-bg: #FFFFFF; --header-fg-muted: var(--hm-brand-900); --header-border: var(--hm-brand-400);
        --hm-muted: var(--hm-brand-800); --hm-hairline: var(--hm-brand-400);
    }
    .navbar.hm-nav { -webkit-backdrop-filter: none; backdrop-filter: none; }
    .card { border: 1px solid var(--hm-hairline) !important; box-shadow: none; }
    .hm-footer { --hm-f-text: #fff; --hm-f-dim: rgba(255,255,255,.9); --hm-f-line: rgba(255,255,255,.4); }
}

/* No backdrop-filter support: make the bar solid. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root { --header-bg: #FFFFFF; --hm-glass: #FFFFFF; }
}
