/* ============================================================
   Nova Agentic — unified site header + phone fixes
   Card t_810fd9e3 (2026-11-23)
   1. one identical header nav on every page, real menu panel below 820px
   2. no input/textarea/select under 16px on <=820px  -> stops iOS zoom-on-focus
   3. chat bubbles always wrap, never clip a sentence
   Loaded from every page AFTER nova.css. Self-contained: nothing in
   nova.css is edited, so the desktop look is untouched.
   ============================================================ */

/* ---------- the bar ---------- */
header.sitebar{
  position:sticky;top:0;z-index:60;
  display:flex;align-items:center;
  padding:12px max((100% - var(--rail,1100px))/2, var(--pad,24px));
  background:rgba(10,11,15,.88);
  backdrop-filter:blur(14px) saturate(140%);
  -webkit-backdrop-filter:blur(14px) saturate(140%);
  border-bottom:1px solid var(--line,#23252f);
  padding-top:calc(12px + env(safe-area-inset-top,0px));
}
header.sitebar .sb-in{display:flex;align-items:center;gap:20px;width:100%;min-width:0}
header.sitebar .sb-brand{
  display:inline-flex;align-items:center;min-height:44px;gap:10px;
  font-weight:650;font-size:15.5px;letter-spacing:-.01em;color:var(--ink,#f2f3f7);
  white-space:nowrap;flex:0 0 auto;margin-right:auto;text-decoration:none;
}
header.sitebar .sb-brand .mark{font-size:13px;color:var(--c1,#22d3ee)}
header.sitebar .sb-brand .thin{color:var(--muted,#a2a6b4);font-weight:450}

/* ---------- the link row (desktop / tablet) ---------- */
header.sitebar .sb-menu{
  margin-left:auto;display:flex;align-items:center;gap:26px;
  font-size:14.5px;color:var(--muted,#a2a6b4);flex-wrap:nowrap;
}
header.sitebar .sb-menu > a{
  position:relative;padding:10px 0;white-space:nowrap;color:inherit;text-decoration:none;
  transition:color .18s ease;
}
header.sitebar .sb-menu > a:not(.btn)::after{
  content:"";position:absolute;left:0;right:0;bottom:4px;height:1px;
  background:var(--grad,linear-gradient(90deg,#22d3ee,#8b5cf6));
  transform:scaleX(0);transform-origin:left;transition:transform .28s ease;
}
header.sitebar .sb-menu > a:not(.btn):hover::after,
header.sitebar .sb-menu > a[aria-current="page"]:not(.btn)::after{transform:scaleX(1)}
header.sitebar .sb-menu > a:hover,
header.sitebar .sb-menu > a[aria-current="page"]{color:var(--ink,#f2f3f7)}
header.sitebar .sb-menu > a.btn.sm{padding:9px 16px;font-size:13.8px;color:#08090d}
header.sitebar .sb-menu > a.btn.sm::after{content:none}

/* ---------- the menu button (hidden until the row no longer fits) ---------- */
header.sitebar .sb-toggle{
  display:none;align-items:center;gap:9px;min-height:44px;padding:0 14px;
  border-radius:12px;border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.05);color:var(--ink,#f2f3f7);
  font:600 14px/1 inherit;cursor:pointer;flex:0 0 auto;
  -webkit-tap-highlight-color:transparent;
}
header.sitebar .sb-toggle .bars{position:relative;display:block;width:16px;height:12px;flex:0 0 auto}
header.sitebar .sb-toggle .bars i{
  position:absolute;left:0;right:0;height:1.6px;border-radius:2px;background:currentColor;
  transition:transform .22s ease,opacity .16s ease;
}
header.sitebar .sb-toggle .bars i:nth-child(1){top:0}
header.sitebar .sb-toggle .bars i:nth-child(2){top:5.2px}
header.sitebar .sb-toggle .bars i:nth-child(3){top:10.4px}
body.sb-open header.sitebar .sb-toggle .bars i:nth-child(1){transform:translateY(5.2px) rotate(45deg)}
body.sb-open header.sitebar .sb-toggle .bars i:nth-child(2){opacity:0}
body.sb-open header.sitebar .sb-toggle .bars i:nth-child(3){transform:translateY(-5.2px) rotate(-45deg)}

/* ---------- phone / small tablet: one row + a full-height panel ---------- */
@media (max-width:899px){
  header.sitebar{padding:6px 16px}
  header.sitebar{padding-top:calc(6px + env(safe-area-inset-top,0px))}
  header.sitebar .sb-in{gap:12px}
  header.sitebar .sb-brand{font-size:15px}
  header.sitebar .sb-toggle{display:inline-flex}

  header.sitebar .sb-menu{
    position:absolute;top:100%;left:0;right:0;
    height:calc(100dvh - var(--sbh,68px) + 1px);
    max-height:calc(100dvh - var(--sbh,68px) + 1px);
    display:none;flex-direction:column;align-items:stretch;justify-content:flex-start;
    gap:0;margin:0;padding:8px 20px calc(24px + env(safe-area-inset-bottom,0px));
    background:#07080c;background-image:none;
    box-shadow:0 30px 60px -20px rgba(0,0,0,.8);
    border-top:1px solid rgba(255,255,255,.06);
    overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
    font-size:18px;
    /* display toggling, not opacity/visibility: the panel is tappable the instant it
       opens and can never be left half-transparent by a stalled transition */
  }
  body.sb-open header.sitebar .sb-menu{display:flex}
  header.sitebar .sb-menu > a{
    display:flex;align-items:center;min-height:56px;padding:0;
    font-size:18px;font-weight:600;color:var(--ink,#f2f3f7);white-space:normal;
    border-bottom:1px solid rgba(255,255,255,.07);
  }
  header.sitebar .sb-menu > a:not(.btn)::after{content:none}
  header.sitebar .sb-menu > a.btn.sm{
    margin-top:22px;justify-content:center;min-height:52px;padding:0 18px;
    font-size:16px;border-bottom:0;
  }
  body.sb-open{overflow:hidden}
}

/* ---------- 900-1000px: the 8-link row only fits with tighter spacing ---------- */
@media (min-width:900px) and (max-width:1000px){
  header.sitebar .sb-in{gap:14px}
  header.sitebar .sb-menu{gap:16px;font-size:13.5px}
  header.sitebar .sb-menu > a.btn.sm{padding:8px 12px;font-size:13px}
}

/* ---------- iOS zoom-on-focus: nothing under 16px can be focused ----------
   Card t_70cd92ec (2026-11-24): the floor used to live inside max-width:820px
   only, so above 820px the hero #chat-input fell back to nova.css's 15px and
   Safari zoomed the page on focus (iPad portrait, small laptops). The floor
   now applies at every width; nova.css itself is untouched. */
input,textarea,select{font-size:16px !important}

/* ---------- chat bubbles: real sentences wrap, they never clip ---------- */
.log .line,#nova-log .line{
  overflow-wrap:anywhere;word-break:break-word;white-space:normal;
  text-overflow:clip;max-width:100%;
}
#nova-chat.herochat #nova-log > .line{max-width:min(88%,100%)}
#nova-chat.herochat #nova-log > .line.nova{max-width:min(88%,100%)}

/* ---------- footer links row must not push the page wide ---------- */
.foot-cols,.foot-grid{min-width:0}
.foot-cols a{overflow-wrap:anywhere}
