/* Public site search (2026-10-20). Header button + search dialog. */
.jyd-search-toggle{display:grid;place-items:center;width:36px;height:32px;padding:0;border:1px solid rgba(127,192,255,.62);border-radius:6px;background:rgba(4,30,58,.38);color:#eaf4ff;cursor:pointer;transition:background .18s ease,border-color .18s ease}
.jyd-search-toggle:hover{background:rgba(18,86,201,.78);border-color:#7fc0ff}
.jyd-search-toggle svg,.jyd-search-bar svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.jyd-search-toggle:focus-visible,.jyd-search a:focus-visible,.jyd-search button:focus-visible{outline:3px solid #7fc0ff;outline-offset:2px}
/* Desktop (>=901px the drawer is display:contents, so brand | nav | languages fill the header grid). The search button adds a fourth column.
   These mirror the site's own header templates plus one "auto" column: styles.css `auto minmax(0,1fr) auto` and cms-site.css (max-width:1080px)
   `minmax(120px,220px) minmax(0,1fr) auto`. If either site rule changes, change its mirror here. Verified on the full isolated site at 940 and 1280 px. */
@media (min-width:901px){header.jyd-has-search{grid-template-columns:auto minmax(0,1fr) auto auto}}
@media (min-width:901px) and (max-width:1080px){header.jyd-has-search{grid-template-columns:minmax(120px,220px) minmax(0,1fr) auto auto}}
/* 901–1080px: the search column takes 48px from the menu. Tighten the menu gap there (as nav-scroll.css already does for French)
   so the last item never drops out of view; verified on the isolated site: en 901 (486→453 px), ru 901/1080. Only ever narrows the gap. */
@media (min-width:901px) and (max-width:1080px){header.jyd-has-search .navbox nav{gap:clamp(8px,1vw,14px)}}
/* Phones: the header keeps only logo | menu (as before search existed); search sits at the top of the
   menu drawer as a field-like row. Desktop (drawer is display:contents) never shows the row. */
.jyd-search-drawer-row{display:none}
@media (max-width:900px){
  .jyd-search-toggle{display:none!important}
  .jyd-search-drawer-row{display:flex;align-items:center;gap:10px;flex:none;width:100%;min-height:48px;margin:0 0 14px;padding:0 14px;border:1px solid rgba(255,255,255,.28);border-radius:8px;background:rgba(255,255,255,.08);color:#d8e8f8;font:inherit;font-size:15px;text-align:left;cursor:pointer}
  .jyd-search-drawer-row svg{flex:none;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
  .jyd-search-drawer-row span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .jyd-search-drawer-row:hover{background:rgba(255,255,255,.14)}
  .jyd-search-drawer-row:focus-visible{outline:3px solid #7fc0ff;outline-offset:2px}
}
.jyd-search[hidden]{display:none!important}
.jyd-search{position:fixed;inset:0;z-index:300;display:flex;justify-content:center;align-items:flex-start;padding:72px 16px 16px}
.jyd-search-backdrop{position:absolute;inset:0;background:rgba(4,20,38,.55)}
.jyd-search-panel{position:relative;display:flex;flex-direction:column;width:min(680px,100%);max-height:calc(100vh - 100px);max-height:calc(100dvh - 100px);background:#fff;color:#16283b;border-radius:12px;box-shadow:0 24px 60px rgba(2,20,42,.35);overflow:hidden}
.jyd-search-bar{display:flex;align-items:center;gap:10px;padding:10px 10px 10px 16px;border-bottom:1px solid #e3e9f0;color:#5d7387}
.jyd-search-bar input{flex:1;min-width:0;height:44px;border:0;outline:0;background:none;font:inherit;font-size:17px;color:#16283b}
.jyd-search-bar input::-webkit-search-cancel-button{display:none}
.jyd-search-close{flex:none;width:44px;height:44px;border:0;border-radius:8px;background:#f1f5f9;color:#16283b;font-size:24px;line-height:1;cursor:pointer}
.jyd-search-status{margin:0;padding:10px 16px 4px;font-size:13px;color:#5d7387;min-height:1em}
.jyd-search-results{list-style:none;margin:0;padding:4px 8px 12px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.jyd-search-results a{display:flex;gap:12px;align-items:center;padding:10px 8px;border-radius:8px;color:inherit;text-decoration:none;min-height:56px}
.jyd-search-results a:hover,.jyd-search-results a:focus{background:#eef5fd}
.jyd-search-results img{flex:none;width:52px;height:52px;object-fit:contain;background:#f5f7fa;border-radius:6px}
.jyd-search-icon{flex:none;display:grid;place-items:center;width:52px;height:52px;border-radius:6px;background:#eef5fd}
.jyd-search-icon::before{content:"";width:22px;height:22px;background:#1256c9;-webkit-mask:var(--jyd-search-glyph) center/contain no-repeat;mask:var(--jyd-search-glyph) center/contain no-repeat}
.jyd-search-icon-article,.jyd-search-icon-story{--jyd-search-glyph:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 3h9l3 3v15H6z'/%3E%3Cpath d='M9 10h6M9 14h6M9 18h4'/%3E%3C/svg%3E")}
.jyd-search-icon-category{--jyd-search-glyph:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='4' y='4' width='7' height='7' rx='1'/%3E%3Crect x='13' y='4' width='7' height='7' rx='1'/%3E%3Crect x='4' y='13' width='7' height='7' rx='1'/%3E%3Crect x='13' y='13' width='7' height='7' rx='1'/%3E%3C/svg%3E")}
.jyd-search-icon-video{--jyd-search-glyph:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E")}
.jyd-search-text{display:grid;gap:2px;min-width:0}
.jyd-search-meta{font-size:12px;color:#5d7387}
.jyd-search-title{font-weight:700;line-height:1.35;overflow-wrap:anywhere}
.jyd-search-snippet{font-size:13px;line-height:1.5;color:#5d7387;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.jyd-search mark{background:#fff1a8;color:inherit;border-radius:2px;padding:0 1px}
.jyd-search-empty{padding:16px 8px;color:#5d7387;line-height:1.6}.jyd-search-empty p{margin:0 0 6px}.jyd-search-empty strong{color:#16283b;overflow-wrap:anywhere}
.jyd-search-empty a{display:inline-flex;align-items:center;min-height:44px;margin-top:6px;padding:0 18px;border-radius:8px;background:#1256c9;color:#fff;font-weight:700;text-decoration:none}
html.jyd-search-open,html.jyd-search-open body{overflow:hidden}
@media (max-width:600px){
  /* Full-screen sheet on phones; 17px input avoids iOS zoom-on-focus. */
  .jyd-search{padding:0}
  .jyd-search-panel{width:100%;height:100vh;height:100dvh;max-height:none;border-radius:0;padding-top:env(safe-area-inset-top)}
  .jyd-search-results{padding-bottom:max(12px,env(safe-area-inset-bottom))}
}
@media (prefers-reduced-motion:reduce){.jyd-search-toggle{transition:none}}
