/* Header: one-row mobile layout with menu drawer (shared by site pages and tool pages) */
.tsx-sbtn,.tsx-burger,.tsx-drawer{display:none}

/* desktop: slightly larger header */
@media(min-width:701px){
  .ts-header .tsx-top-in{min-height:78px}
  .ts-header .ts-brand-logo{width:54px!important;height:54px!important}
  .ts-header .ts-brand strong{font-size:22px}
  .ts-header .tsx-search{height:46px;max-width:600px}
  .ts-header .tsx-search input{font-size:15px}
  .ts-header .tsx-moon{width:44px;height:44px}
  .ts-header .tsx-nav a{padding:11px 18px;font-size:15px}
  .ts-header .ts-actions a{font-size:13.5px;padding:10px 16px}
}

@media(max-width:700px){
  html body .ts-header{position:sticky!important;top:0;z-index:100}
  html body .ts-header .tsx-top-in{display:flex;flex-wrap:wrap;align-items:center;gap:7px;min-height:62px;padding-block:7px!important}
  html body .ts-header .ts-brand{order:1;flex:1 1 0;min-width:0;margin-right:auto;overflow:hidden}
  html body .ts-header .ts-brand-logo{width:44px!important;height:44px!important;flex:none}
  html body .ts-header .ts-brand strong{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html body .ts-header .ts-actions{display:contents}
  html body .ts-header .tsx-moon,html body .ts-header .ts-signup,html body .ts-header .ts-subscribe,html body .ts-header .ts-user .ts-nm,html body .ts-header .ts-user .ts-adm,html body .ts-header .ts-user .ts-out{display:none!important}
  html body .ts-header .ts-login{display:inline-flex!important;order:3;align-items:center;padding:9px 14px;border-radius:999px;font-size:13.5px;font-weight:800}
  html body .ts-header .ts-user{order:3;flex:none;display:flex}
  html body .ts-header .ts-user .ts-me{padding:3px;gap:0;display:inline-flex}
  html body .ts-header .tsx-sbtn,html body .ts-header .tsx-burger{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:50%;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.1);color:#fff;cursor:pointer;padding:0;flex:none}
  html body .ts-header .tsx-sbtn{order:4}
  html body .ts-header .tsx-burger{order:5;align-content:center;gap:4px}
  html body .ts-header .tsx-sbtn svg{width:20px;height:20px}
  .tsx-burger span{display:block;width:19px;height:2.5px;border-radius:2px;background:#fff}
  html body .ts-header .tsx-search{display:none;order:9;flex:1 1 100%;max-width:none;height:44px;margin:0 0 2px}
  html body .ts-header.s-open .tsx-search{display:flex}
  html body .ts-header .tsx-navrow{display:none}

  .tsx-drawer{position:fixed;inset:0;z-index:2000}
  .tsx-drawer.open{display:block}
  .tsx-dbg{position:absolute;inset:0;background:rgba(3,10,30,.6)}
  .tsx-dp{position:absolute;top:0;right:0;bottom:0;width:min(84vw,330px);background:linear-gradient(180deg,#0b2a6b,#071d4a);color:#fff;padding:16px 16px 22px;overflow-y:auto;display:flex;flex-direction:column;gap:14px;box-shadow:-12px 0 36px rgba(0,0,0,.4)}
  .tsx-dh{display:flex;align-items:center;justify-content:space-between}
  .tsx-dh strong{font-size:18px;font-weight:800;color:#fff}
  .tsx-dh strong em{color:#6fdcff;font-style:normal}
  .tsx-dx{width:40px;height:40px;border-radius:50%;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.1);color:#fff;font-size:26px;line-height:1;cursor:pointer}
  .tsx-dn{display:flex;flex-direction:column;gap:4px}
  .tsx-dn a{display:flex;align-items:center;gap:12px;padding:13px 12px;border-radius:12px;color:#fff;text-decoration:none;font-size:16px;font-weight:700}
  .tsx-dn a:active,.tsx-dn a:hover{background:rgba(255,255,255,.14)}
  .tsx-dn a svg{width:20px;height:20px;flex:none;color:#8be8ff}
  .tsx-da{display:flex;gap:10px;flex-wrap:wrap;margin-top:4px}
  .tsx-da a{flex:1 1 130px;text-align:center;padding:13px 12px;border-radius:999px;font-weight:800;font-size:15px;text-decoration:none}
  .tsx-da .d1{background:rgba(255,255,255,.14);color:#fff;border:1px solid rgba(255,255,255,.4)}
  .tsx-da .d2{background:#ffd01a;color:#1a1400}
  .tsx-dtheme{display:flex;align-items:center;gap:12px;padding:13px 12px;border-radius:12px;border:1px solid rgba(255,255,255,.2);background:transparent;color:#fff;font:inherit;font-size:15px;font-weight:700;cursor:pointer}
  .tsx-dtheme svg{width:20px;height:20px;color:#ffd978}
}
