/* Site header (_Layout.cshtml, header.js); scoped under .tm-hdr, pages reserve the 64px bar */
.tm-hdr {
    --h-orange: #ff5000;
    --h-orange-2: #ff6c1f;
    --h-orange-text: #c23c00;
    --h-tint: #fff4ee;
    --h-tint-2: #ffe7da;
    --h-ink: #1f2329;
    --h-text: #4a4f57;
    --h-muted: #6b7280;
    --h-line: #efe9e5;
    --h-h: 64px;
    --h-ease: cubic-bezier(.2, .8, .2, 1);
    /* 100vw, not left/right 0: the bar does not shift when a scrollbar appears */
    position: fixed; top: 0; left: 0; width: 100vw; z-index: 1000; height: var(--h-h);
    margin: 0; padding: 0; border: 0; background: transparent;
    font-size: 15px; line-height: 1.4; color: var(--h-text);
}
.tm-hdr *, .tm-hdr *::before, .tm-hdr *::after { box-sizing: border-box; }
.tm-hdr :where(span, p, strong, h2, h3) { margin: 0; color: inherit; font-size: inherit; font-weight: inherit; }
.tm-hdr :where(ul) { margin: 0; padding: 0; list-style: none; }
/* Resets in :where(): beat the site's bare rules but not the classes below */
.tm-hdr :where(a), .tm-hdr :where(a):hover, .tm-hdr :where(a):focus { color: inherit; text-decoration: none; }
.tm-hdr svg { padding: 0; flex: none; }
.tm-hdr :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
.tm-hdr :focus-visible { outline: 2px solid var(--h-orange-2); outline-offset: 2px; }

/* Bar */
.tm-hdr__bar {
    position: relative; z-index: 2; height: var(--h-h);
    background: #fff; border-bottom: 1px solid var(--h-line);
    transition: background-color .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tm-hdr.is-scrolled .tm-hdr__bar {
    background: rgba(255, 255, 255, .9); border-color: transparent;
    box-shadow: 0 8px 28px -16px rgba(17, 17, 17, .28);
    -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
}
.tm-hdr__inner {
    display: flex; align-items: center; gap: 28px; height: 100%;
    max-width: 1440px; margin: 0 auto; padding: 0 32px;
}
.tm-hdr__logo { flex: none; display: flex; align-items: center; height: 100%; }
.tm-hdr__logo img { display: block; width: 113px; height: 32px; transition: transform .3s var(--h-ease); }
.tm-hdr__logo:hover img { transform: scale(1.04); }

/* Desktop menu */
.tm-nav { position: relative; display: flex; align-items: center; gap: 4px; height: 100%; }
.tm-nav__glow {
    position: absolute; top: 50%; left: 0; height: 40px; margin-top: -20px; width: 0; border-radius: 10px;
    background: var(--h-tint); opacity: 0; pointer-events: none;
    transition: transform .3s var(--h-ease), width .3s var(--h-ease), opacity .2s ease;
}
.tm-nav__item { position: relative; display: flex; align-items: center; height: 100%; }
.tm-nav__link {
    position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px;
    border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--h-ink); white-space: nowrap;
    transition: color .2s ease;
}
.tm-nav__link:hover, .tm-nav__item.is-open .tm-nav__link { color: var(--h-orange-text); }
.tm-nav__chev { width: 14px; height: 14px; transition: transform .3s var(--h-ease); }
.tm-nav__item.is-open .tm-nav__chev { transform: rotate(180deg); }
/* Section of the current page */
.tm-nav__link.is-current { color: var(--h-orange-text); }
.tm-nav__link.is-current::after {
    content: ""; position: absolute; left: 14px; right: 34px; bottom: -11px; height: 3px; border-radius: 3px 3px 0 0;
    background: var(--h-orange);
}

.tm-menu {
    position: absolute; top: calc(100% - 4px); left: -6px; z-index: 3; width: max-content; max-width: min(640px, calc(100vw - 32px));
    padding: 10px; border-radius: 18px; background: #fff;
    box-shadow: 0 0 0 1px rgba(17, 17, 17, .05), 0 24px 56px -20px rgba(17, 17, 17, .32);
    /* --nudge is set by header.js to keep the menu inside the window */
    opacity: 0; visibility: hidden; transform: translate(var(--nudge, 0px), 10px) scale(.98); transform-origin: top left;
    transition: opacity .18s ease, transform .22s var(--h-ease), visibility 0s linear .22s;
}
.tm-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }   /* the mouse can cross the gap */
.tm-nav__item.is-open .tm-menu {
    opacity: 1; visibility: visible; transform: translate(var(--nudge, 0px), 0) scale(1);
    transition: opacity .22s ease, transform .3s var(--h-ease), visibility 0s;
}
/* Columns wide enough for most descriptions to fit their two lines whole */
.tm-menu__grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 336px)); gap: 4px; }
.tm-menu--one .tm-menu__grid { grid-template-columns: minmax(280px, 340px); }

/* Menu entry */
.tm-entry {
    position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 12px 36px 12px 12px; border-radius: 12px;
    transition: background-color .2s ease;
}
.tm-entry:hover, .tm-entry:focus-visible { background: #faf6f3; }
.tm-entry[aria-current="page"] { background: var(--h-tint); }
.tm-entry__icon {
    flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
    background: var(--h-tint); color: var(--h-orange);
    transition: background-color .25s ease, box-shadow .25s ease;
}
.tm-entry__icon img { width: 26px; height: 26px; transition: transform .3s var(--h-ease); }
.tm-entry__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--h-ease); }
/* Hover keeps the icon's own colours (they tell services apart); only the tile changes */
.tm-entry:hover .tm-entry__icon, .tm-entry:focus-visible .tm-entry__icon { background: #ffe8db; box-shadow: inset 0 0 0 1px #ffcfb3; }
.tm-entry:hover .tm-entry__icon img, .tm-entry:focus-visible .tm-entry__icon img,
.tm-entry:hover .tm-entry__icon svg, .tm-entry:focus-visible .tm-entry__icon svg { transform: scale(1.06); }
.tm-entry__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 2px; }
.tm-entry__title { font-size: 15px; font-weight: 600; color: var(--h-ink); transition: color .2s ease; }
.tm-entry:hover .tm-entry__title, .tm-entry:focus-visible .tm-entry__title { color: var(--h-orange-text); }
/* Always two lines tall so every entry has the same height */
.tm-entry__desc {
    min-height: calc(1.45em * 2); font-size: 13px; line-height: 1.45; color: var(--h-muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tm-entry__go {
    position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--h-orange);
    fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    opacity: 0; transform: translateX(-6px); transition: opacity .2s ease, transform .25s var(--h-ease);
}
.tm-entry:hover .tm-entry__go, .tm-entry:focus-visible .tm-entry__go { opacity: 1; transform: none; }
/* Staggered entrance */
.tm-menu .tm-entry { opacity: 0; transform: translateY(6px); }
.tm-nav__item.is-open .tm-menu .tm-entry {
    opacity: 1; transform: none;
    transition: background-color .2s ease, opacity .3s ease calc(var(--i, 0) * 35ms + 40ms), transform .35s var(--h-ease) calc(var(--i, 0) * 35ms + 40ms);
}

/* Right side: search, language, account, burger */
.tm-hdr__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tm-icon-btn {
    position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
    color: var(--h-ink); transition: background-color .2s ease, color .2s ease;
}
.tm-icon-btn:hover, .tm-icon-btn[aria-expanded="true"] { background: var(--h-tint); color: var(--h-orange-text); }
.tm-icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tm-drop { position: relative; }
/* Language pill: min-width so EN and TL don't shift the buttons beside it */
.tm-langbtn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 74px; height: 40px; padding: 0 12px;
    border-radius: 999px; cursor: pointer; border: 1px solid var(--h-line); font-size: 14px; font-weight: 700; letter-spacing: .02em;
    color: var(--h-ink); user-select: none; transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.tm-langbtn:hover { background: var(--h-tint); border-color: var(--h-tint-2); color: var(--h-orange-text); }
.tm-langbtn img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(17, 17, 17, .08); }
.tm-langbtn span { position: relative; top: -1px; }   /* caps sit ~1px low beside a centred image */
.tm-langbtn.is-switching { pointer-events: none; }
.tm-drop.is-open .tm-nav__chev { transform: rotate(180deg); }
/* Account pop-up */
.tm-pop {
    position: absolute; top: calc(100% + 10px); right: 0; z-index: 3; min-width: 200px; padding: 8px; border-radius: 16px; background: #fff;
    box-shadow: 0 0 0 1px rgba(17, 17, 17, .05), 0 20px 44px -18px rgba(17, 17, 17, .32);
    opacity: 0; visibility: hidden; transform: translateY(8px) scale(.97); transform-origin: top right;
    transition: opacity .16s ease, transform .2s var(--h-ease), visibility 0s linear .2s;
}
.tm-drop.is-open .tm-pop { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .28s var(--h-ease), visibility 0s; }
.tm-pop__item {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--h-ink); transition: background-color .2s ease, color .2s ease;
}
.tm-pop__item:hover { background: #faf6f3; color: var(--h-orange-text); }
.tm-pop__item img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.tm-pop__item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tm-pop__me { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--h-line); }
.tm-pop__me img { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 3px 8px -3px rgba(255, 80, 0, .5); }
.tm-pop__hi { display: block; font-size: 13px; color: var(--h-muted); }
.tm-pop__phone { display: block; font-size: 15px; font-weight: 700; color: var(--h-ink); }
.tm-pop__item--out { color: #b42318; }
.tm-pop__item--out:hover { background: #fef3f2; color: #b42318; }

/* Log in, styled like the login page's buttons */
.tm-login {
    position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 10px; isolation: isolate;
    background: linear-gradient(135deg, var(--h-orange-2) 0%, var(--h-orange) 100%); color: #fff !important; font-size: 14px; font-weight: 700;
    box-shadow: 0 8px 18px -10px rgba(255, 80, 0, .7); overflow: hidden; white-space: nowrap;
    transition: color .2s ease, box-shadow .2s ease;
}
.tm-login::after {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #fff;
    box-shadow: inset 0 0 0 1.5px var(--h-orange); opacity: 0; transition: opacity .2s ease;
}
.tm-login:hover { color: var(--h-orange) !important; box-shadow: 0 6px 14px -10px rgba(255, 80, 0, .5); }
.tm-hdr__actions > .tm-login { min-width: 84px; justify-content: center; }   /* same width for "Login" and "Tama" */
.tm-login:hover::after { opacity: 1; }
/* Account button */
.tm-avatar {
    width: 38px; height: 38px; padding: 0; border-radius: 11px; overflow: hidden;
    box-shadow: 0 3px 8px -3px rgba(255, 80, 0, .55); transition: box-shadow .2s ease;
}
.tm-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit; }
.tm-avatar:hover, .tm-drop.is-open .tm-avatar { box-shadow: 0 0 0 3px #ffd9c6, 0 3px 8px -3px rgba(255, 80, 0, .55); }

/* Burger */
.tm-burger { display: none; position: relative; width: 40px; height: 40px; border-radius: 50%; transition: background-color .2s ease; }
.tm-burger:hover { background: var(--h-tint); }
.tm-burger span {
    position: absolute; left: 11px; width: 18px; height: 2px; border-radius: 2px; background: var(--h-ink);
    transition: transform .35s var(--h-ease), opacity .2s ease, top .35s var(--h-ease);
}
.tm-burger span:nth-child(1) { top: 13px; }
.tm-burger span:nth-child(2) { top: 19px; }
.tm-burger span:nth-child(3) { top: 25px; }
.tm-burger[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.tm-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.tm-burger[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* Phone menu */
.tm-mnav { position: fixed; top: var(--h-h); left: 0; right: 0; bottom: 0; z-index: 1; visibility: hidden; transition: visibility 0s linear .35s; }
.tm-mnav.is-open { visibility: visible; transition: visibility 0s; }
.tm-mnav__shade { position: absolute; inset: 0; background: rgba(23, 18, 15, .4); opacity: 0; transition: opacity .3s ease; }
.tm-mnav.is-open .tm-mnav__shade { opacity: 1; }
.tm-mnav__panel {
    position: relative; max-height: 100%; overflow-y: auto; overscroll-behavior: contain;
    padding: 12px 16px 20px; background: #fff; border-radius: 0 0 22px 22px;
    box-shadow: 0 24px 48px -24px rgba(17, 17, 17, .35);
    transform: translateY(-14px); opacity: 0; transition: transform .35s var(--h-ease), opacity .25s ease;
}
.tm-mnav.is-open .tm-mnav__panel { transform: none; opacity: 1; }
.tm-mnav__sec { border-bottom: 1px solid var(--h-line); opacity: 0; transform: translateY(-6px); }
.tm-mnav.is-open .tm-mnav__sec { opacity: 1; transform: none; transition: opacity .3s ease calc(var(--i, 0) * 50ms + 60ms), transform .35s var(--h-ease) calc(var(--i, 0) * 50ms + 60ms); }
.tm-mnav__head {
    display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 54px; padding: 0 4px;
    font-size: 16px; font-weight: 700; color: var(--h-ink); text-align: left;
}
.tm-mnav__head.is-current { color: var(--h-orange-text); }
.tm-mnav__head .tm-nav__chev { width: 18px; height: 18px; color: var(--h-muted); }
.tm-mnav__sec.is-open .tm-mnav__head .tm-nav__chev { transform: rotate(180deg); color: var(--h-orange); }
.tm-mnav__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--h-ease); }
.tm-mnav__sec.is-open .tm-mnav__body { grid-template-rows: 1fr; }
.tm-mnav__list { min-height: 0; overflow: hidden; }
.tm-mnav__list .tm-entry { align-items: center; padding: 8px 36px 8px 6px; }
.tm-mnav__list .tm-entry:last-child { margin-bottom: 10px; }
.tm-mnav__list .tm-entry__icon { width: 38px; height: 38px; border-radius: 11px; }
.tm-mnav__list .tm-entry__icon img { width: 22px; height: 22px; }
.tm-mnav__list .tm-entry__icon svg { width: 19px; height: 19px; }
.tm-mnav__list .tm-entry__text { padding-top: 0; }
.tm-mnav__list .tm-entry__desc { min-height: 0; -webkit-line-clamp: 1; }
.tm-mnav__list .tm-entry__go { opacity: .45; transform: none; }
.tm-mnav__list .tm-entry { opacity: 0; transform: translateX(-6px); }
.tm-mnav__sec.is-open .tm-mnav__list .tm-entry {
    opacity: 1; transform: none;
    transition: background-color .2s ease, opacity .3s ease calc(var(--i, 0) * 35ms + 80ms), transform .35s var(--h-ease) calc(var(--i, 0) * 35ms + 80ms);
}
.tm-mnav__foot { display: grid; gap: 12px; padding-top: 16px; opacity: 0; }
.tm-mnav.is-open .tm-mnav__foot { opacity: 1; transition: opacity .3s ease .25s; }
/* Language toggle */
.tm-mnav__lang { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: #f2eeeb; }
.tm-mnav__lang::before {
    content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: #fff;
    box-shadow: 0 1px 3px rgba(17, 17, 17, .08); transition: transform .3s var(--h-ease);
}
.tm-mnav__lang[data-lang="fr"]::before { transform: translateX(100%); }
.tm-mnav__lang button {
    position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px;
    border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--h-text); transition: color .25s ease;
}
.tm-mnav__lang button.is-active { color: var(--h-orange-text); }
.tm-mnav__lang img { width: 20px; height: 20px; border-radius: 50%; }
.tm-mnav__foot .tm-login { justify-content: center; height: 48px; font-size: 15px; }
.tm-mnav__me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: #faf6f3; }
.tm-mnav__me img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 3px 8px -3px rgba(255, 80, 0, .5); }
.tm-mnav__links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tm-mnav__links a {
    display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 12px;
    border: 1px solid var(--h-line); font-size: 14px; font-weight: 700; color: var(--h-ink);
}
.tm-mnav__links a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tm-mnav__links a.is-out { color: #b42318; }
html.tm-mnav-open, html.tm-mnav-open body { overflow: hidden; }   /* the page stays still under the open menu */
.tm-hdr.tm-instant, .tm-hdr.tm-instant * { transition: none !important; }   /* menu restored after a language switch */

/* Cross-fade on language switch only; header.js and _Layout skip it for other navigations */
@view-transition { navigation: auto; }
.tm-hdr__bar { view-transition-name: tm-bar; }
::view-transition-group(tm-bar) { z-index: 2; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }
::view-transition-old(tm-bar), ::view-transition-new(tm-bar) { animation-duration: .25s; }
@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Search; the old script (jquery-3.3.1.js) opens .search-box with .show */
.tm-hdr .sub-search { position: relative; z-index: 1; }
.tm-hdr .search-box {
    position: fixed; top: calc(var(--h-h) + 12px); left: 0; right: 0; width: min(820px, calc(100vw - 32px)); margin: 0 auto; z-index: 2;
    max-height: calc(100vh - var(--h-h) - 24px); max-height: calc(100dvh - var(--h-h) - 24px); overflow-y: auto; overscroll-behavior: contain;
    padding: 26px 0 28px; background: #fff; border-radius: 20px;
    box-shadow: 0 0 0 1px rgba(17, 17, 17, .04), 0 32px 72px -28px rgba(17, 17, 17, .45);
    visibility: hidden; opacity: 0; transform: translateY(-12px);
    transition: opacity .22s ease, transform .35s var(--h-ease), visibility 0s linear .35s;
}
.tm-hdr .search-box.show { visibility: visible; opacity: 1; transform: none; transition: opacity .22s ease, transform .35s var(--h-ease), visibility 0s; }
/* Dimmed page; the old script closes the search on any outside click */
.tm-search-dim {
    position: fixed; top: var(--h-h); left: 0; right: 0; bottom: 0; z-index: 1; background: rgba(17, 17, 17, .32);
    opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility 0s linear .25s;
}
.tm-hdr .search-box.show + .tm-search-dim { opacity: 1; visibility: visible; transition: opacity .25s ease, visibility 0s; }
.tm-search { margin: 0 28px; }
.tm-search__bar { display: flex; gap: 10px; }
.tm-hdr .tm-search__field {
    flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; height: 56px; padding: 0 8px 0 18px;
    border: 1.5px solid #e6dfd9; border-radius: 14px; background: #fff; box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.tm-hdr .tm-search__field:hover { border-color: #d3c8bf; }
.tm-hdr .tm-search__field:focus-within { border-color: var(--h-orange); box-shadow: 0 0 0 4px rgba(255, 80, 0, .12); }
.tm-search__ico { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--h-muted); stroke-width: 2; stroke-linecap: round; transition: stroke .2s ease; }
.tm-search__field:focus-within .tm-search__ico { stroke: var(--h-orange); }
.tm-hdr .search-input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; color: var(--h-ink); }
.tm-hdr .search-input::placeholder { color: #9aa0a8; }
.tm-hdr .clear-icon {
    flex: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
    color: var(--h-muted); transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}
.tm-hdr .clear-icon:hover { background: #f4efeb; color: var(--h-ink); }
.tm-hdr .clear-icon.hidden { opacity: 0; visibility: hidden; }
.tm-hdr .clear-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
/* Search button, styled like the site's main button */
.tm-hdr #btn-search-key {
    flex: none; display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 24px;
    border: 1.5px solid var(--h-orange); border-radius: 14px; background: var(--h-orange); color: #fff;
    font-size: 16px; font-weight: 600; line-height: 1; transition: background-color .2s ease, color .2s ease;
}
.tm-hdr #btn-search-key:hover, .tm-hdr #btn-search-key:focus-visible { background: #fff; color: var(--h-orange-text); }
.tm-search__arrow { width: 10px; height: 10px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tm-search__arrow-line { opacity: 0; transition: opacity .2s ease; }
.tm-search__arrow-head { transition: transform .2s var(--h-ease); }
#btn-search-key:hover .tm-search__arrow-line, #btn-search-key:focus-visible .tm-search__arrow-line { opacity: 1; }
#btn-search-key:hover .tm-search__arrow-head, #btn-search-key:focus-visible .tm-search__arrow-head { transform: translateX(3px); }

/* Matches while typing (filled by header.js) */
.tm-search__list { margin: 14px 0 0; padding: 6px; list-style: none; border: 1px solid var(--h-line); border-radius: 16px; background: #fff; }
.tm-search__list[hidden] { display: none; }
.tm-search__opt { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; color: var(--h-ink); cursor: pointer; }
.tm-search__opt.is-active { background: #faf6f3; }
.tm-search__opt-ico {
    flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
    background: var(--h-tint); color: var(--h-orange); transition: background-color .2s ease, box-shadow .2s ease;
}
.tm-search__opt.is-active .tm-search__opt-ico { background: #ffe8db; box-shadow: inset 0 0 0 1px #ffcfb3; }
.tm-search__opt-ico img { width: 24px; height: 24px; }
.tm-search__opt-ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tm-search__opt-text { flex: 1; min-width: 0; }
.tm-hdr .tm-search__opt-text b { display: block; font-size: 15px; line-height: 1.35; font-weight: 600; color: var(--h-ink); }
.tm-hdr .tm-search__opt-text mark { padding: 0; background: none; color: var(--h-orange-text); }
.tm-hdr .tm-search__opt-text small { display: block; overflow: hidden; font-size: 13px; line-height: 1.4; color: var(--h-muted); white-space: nowrap; text-overflow: ellipsis; }
.tm-search__opt-go {
    flex: none; width: 18px; height: 18px; fill: none; stroke: var(--h-orange-text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    opacity: 0; transform: translateX(-4px); transition: opacity .2s ease, transform .25s var(--h-ease);
}
.tm-search__opt.is-active .tm-search__opt-go { opacity: 1; transform: none; }
.tm-search__opt.is-all { margin-top: 4px; }
.tm-search__opt.is-all .tm-search__opt-ico { background: #f4efeb; color: var(--h-ink); }
.tm-search__list li + li.is-all { position: relative; }
.tm-search__list li + li.is-all::before { content: ""; position: absolute; top: -3px; left: 12px; right: 12px; height: 1px; background: var(--h-line); }
@keyframes tm-search-in { from { opacity: 0; transform: translateY(4px); } }
/* Animate only when the list first appears, not on each key */
.tm-search__list.is-fresh .tm-search__opt { animation: tm-search-in .25s var(--h-ease) both; animation-delay: calc(var(--i, 0) * 30ms); }

/* Nothing typed: recent searches and suggested pages */
.tm-search__idle { display: grid; gap: 24px; margin-top: 24px; }
.tm-search__idle[hidden] { display: none; }
.tm-hdr .title-key-search { margin: 0 0 10px; font-size: 12px; line-height: 1.3; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--h-muted); }
.tm-search__recent:has(.wrapper-search-keyword:empty) { display: none; }
.tm-hdr .wrapper-search-keyword { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.tm-hdr .item-search-keyword {
    display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 11px; border: 1px solid var(--h-line);
    border-radius: 999px; background: #fff; color: var(--h-text); cursor: pointer; transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.tm-hdr .item-search-keyword:nth-child(n+9) { display: none; }
/* Clock icon */
.tm-hdr .item-search-keyword::before {
    content: ""; flex: none; width: 15px; height: 15px; background: currentColor; opacity: .6;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tm-hdr .item-search-keyword p { margin: 0; font-size: 14px; font-weight: 500; color: inherit; }
.tm-hdr .item-search-keyword:hover { background: var(--h-tint); border-color: #ffcfb3; color: var(--h-orange-text); }
.tm-search__tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.tm-hdr .column-item-search {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 6px 14px;
    border-radius: 14px; text-align: center; text-decoration: none; transition: background-color .2s ease;
}
/* Tile is a ::before layer behind the image; hover matches the menu entries */
.tm-hdr .column-item-search::before {
    content: ""; position: absolute; top: 12px; left: 50%; width: 48px; height: 48px; margin-left: -24px; border-radius: 13px;
    background: var(--h-tint); transition: background-color .25s ease, box-shadow .25s ease;
}
.tm-hdr .column-item-search img { position: relative; width: 48px; height: 48px; padding: 10px; background: none; transition: transform .3s var(--h-ease); }
.tm-hdr .column-item-search:hover { background: #faf6f3; }
.tm-hdr .column-item-search:hover::before { background: #ffe8db; box-shadow: inset 0 0 0 1px #ffcfb3; }
.tm-hdr .column-item-search:hover img { transform: scale(1.06); }
.tm-hdr .column-item-search:hover .column-item-search-name { color: var(--h-orange-text); }
.tm-hdr .column-item-search-name { font-size: 14px; line-height: 1.3; font-weight: 600; color: var(--h-ink); transition: color .2s ease; }
/* Staggered entrance */
.tm-hdr .search-box .column-item-search { opacity: 0; }
.tm-hdr .search-box.show .column-item-search { opacity: 1; transition: background-color .2s ease, opacity .3s ease calc(var(--i, 0) * 40ms + 80ms); }
.tm-search__none { margin-top: 32px; text-align: center; color: var(--h-text); }
.tm-hdr .tm-search__none-title { margin: 12px 0 6px; font-size: 20px; font-weight: 700; color: var(--h-ink); }

/* Phone header (up to 1023px) */
@media (max-width: 1023.98px) {
    .tm-hdr__inner { gap: 12px; padding: 0 16px; }
    .tm-nav, .tm-hdr .tm-lang { display: none; }
    .tm-burger { display: block; }
    .tm-hdr__actions { gap: 6px; }
    .tm-login { height: 38px; padding: 0 14px; }
    .tm-hdr__actions > .tm-login { min-width: 70px; }
}
@media (min-width: 1024px) {
    .tm-mnav { display: none; }
}
@media (max-width: 575.98px) {
    .tm-hdr__logo img { width: 98px; height: 28px; }
    .tm-hdr .search-box { top: calc(var(--h-h) + 8px); width: calc(100vw - 16px); padding: 16px 0 20px; border-radius: 18px; }
    .tm-search { margin: 0 14px; }
    .tm-hdr .tm-search__field { height: 52px; padding-left: 14px; gap: 10px; }
    .tm-hdr .search-input { font-size: 16px; }
    .tm-hdr #btn-search-key { height: 52px; padding: 0 16px; }
    .tm-search__tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tm-search__idle { gap: 20px; margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .tm-hdr *, .tm-hdr *::before, .tm-hdr *::after { transition-duration: 0s !important; transition-delay: 0s !important; }
    .tm-hdr .tm-search__opt { animation: none !important; }
}
