/* SanctionsAI UI/UX baseline (SIP-41, 2026-11-25). Loaded after page CSS on every
   HTML page by api.py _ux_enhance(). Layout-only: no copy, no scripts. */

/* compact site header injected on pages that had none */
.ux-hdr{display:flex;align-items:center;gap:8px 20px;flex-wrap:wrap;padding:8px 20px;background:#0a0a0a;border-bottom:1px solid #1f1f1f;font-family:-apple-system,system-ui,"Segoe UI",Roboto,sans-serif;margin:0 0 16px}
.ux-hdr-logo{font-weight:700;font-size:1.15rem;color:#fff!important;text-decoration:none!important;min-height:44px;display:inline-flex;align-items:center}
.ux-hdr-logo span{color:#00d4aa}
.ux-hdr .ux-hdr-links{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:4px 18px;flex:1 1 auto;min-width:0;flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:0;margin:0;border:0;background:none}
.ux-hdr-links::-webkit-scrollbar{display:none}
.ux-hdr-links a{color:#bbb!important;text-decoration:none!important;font-size:.95rem;white-space:nowrap;min-height:44px;display:inline-flex;align-items:center}
.ux-hdr-links a:hover{color:#fff!important}

/* keyboard focus */
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #00d4aa;outline-offset:2px}

/* never scroll sideways */
h1,h2,h3{overflow-wrap:anywhere}
html{-webkit-text-size-adjust:100%}
img,video,iframe,svg{max-width:100%;height:auto}
pre{max-width:100%;overflow-x:auto;white-space:pre-wrap;word-break:break-word}
code{overflow-wrap:anywhere}

/* templates that put content straight into <body> (no wrapper): give it a
   readable column with side padding instead of running edge to edge */
body.ux-page>:is(h1,h2,h3,h4,p,table,pre,blockquote,dl,form,div:not([class])){max-width:720px;margin-left:auto;margin-right:auto;padding-left:20px;padding-right:20px}
body.ux-page>:is(ul,ol){max-width:720px;margin-left:auto;margin-right:auto;padding-left:calc(20px + 1.2em);padding-right:20px}
body.ux-page>h1:first-of-type{margin-top:24px}

@media (max-width:640px){
  html,body{overflow-x:clip}
  .ux-hdr{padding:4px 16px}
  table{display:block;max-width:100%;overflow-x:auto}
  /* headings: keep the first screen for the message + the CTA */
  h1{font-size:clamp(1.55rem,7vw,2.2rem)!important;line-height:1.2!important}
  /* comfortable tap targets for link lists and footer links */
  li>a:only-child,footer a,nav a{display:inline-block;min-height:24px;padding-top:6px;padding-bottom:6px}
  input,select,textarea{font-size:16px}
  /* shared template nav: one compact row (logo + CTA), links scroll sideways */
  nav:has(>.logo+.links){flex-direction:row!important;flex-wrap:wrap;align-items:center;padding:6px 16px!important;gap:0 12px}
  nav>.logo+.links{flex-wrap:nowrap!important;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;gap:0 16px!important;width:100%;order:3}
  nav>.logo+.links::-webkit-scrollbar{display:none}
  nav>.logo+.links a{white-space:nowrap;min-height:40px;display:inline-flex;align-items:center;padding:0}
  nav>.logo+.links .btn{min-height:36px;padding:6px 14px}
  /* free checker: full-width input + button on phones (input was ~60px wide) */
  .checker-widget{padding:20px 16px!important}
  .checker-widget>div[style*="display:flex"]{flex-wrap:wrap}
  .checker-widget #wallet{flex:1 1 100%!important;min-width:0;min-height:48px}
  .checker-widget #check-btn{flex:1 1 100%;min-height:48px}
}
