body{
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color: var(--text,#111827);
  background: #f5f6f8;
}
:root{
  --radius: 18px;
  --pad: 24px;
  --pad-sm: 16px;
}

/* Cards / panels */
.card{
  border-radius: var(--radius);
  padding: var(--pad);
  background: #ffffff;
  border: 1px solid rgba(17,24,39,0.08);
  box-shadow: 0 6px 18px rgba(17,24,39,0.06);
}
.card .card{ padding: var(--pad-sm); }

/* Form controls */
input, select, textarea{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(17,24,39,0.14);
  background: #ffffff;
  font-size: 14px;
  line-height: 1.35;
}

textarea{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}

/* Buttons */
button, .btn{
  padding: 12px 18px;
  border-radius: 14px;
}

.btn.primary, button.primary{
  background: #111827;
  color: #fff;
  border: 1px solid rgba(17,24,39,0.25);
}

.btn.outline, button.outline{
  background: #fff;
  color: #111827;
  border: 1px solid rgba(17,24,39,0.25);
}

/* Simple centered top nav (works even if pages use different nav markup) */
.nav{
  display:flex;
  justify-content:center;
  gap: 10px;
  flex-wrap:wrap;
}
.nav a{
  display:inline-block;
  padding: 10px 12px;
  border-radius: 12px;
}

/* Layout breathing room */
.container{ padding-left: 24px; padding-right: 24px; }

/* Reduce harsh edges between stacked blocks */
.card + .card{ margin-top: 18px; }

@media (max-width: 720px){
  .card{ padding: 18px; }
  button, .btn{ width: 100%; }
}

/* Brand logo (placeholder) */
.logo{
  width: 28px;
  height: 28px;
  display: inline-block;
  border-radius: 8px;
  background: url('/assets/northgrid-logo.svg') center / contain no-repeat;
  box-shadow: 0 1px 0 rgba(0,0,0,0.12);
}

/* =========================
   Shared top navigation
   ========================= */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.topbar-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar .brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.topbar .brand span:last-child{
  font-size: 16px;
}

.navlinks{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.navlinks a{
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.navlinks a:hover{
  background: #f1f5f9;
}

.navlinks a.active{
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.navlinks a.primary{
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.navlinks a.primary:hover{
  filter: brightness(0.95);
}

.navlinks a.ghost{ }

.navlinks [data-hide="1"]{
  display: none !important;
}

@media (max-width: 720px){
  .topbar-inner{
    padding: 10px 14px;
  }
  .navlinks{
    gap: 6px;
  }
  .navlinks a{
    padding: 7px 9px;
    font-size: 13px;
  }
  .topbar .brand span:last-child{
    font-size: 15px;
  }
}


.brand-logo{
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
}
.brand-text{
  display: inline-block;
}

.site-footer{
  margin-top: 48px;
  padding: 18px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: #fff;
}
.footer-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-link{
  color: #1f2937;
  text-decoration: underline;
  font-size: 14px;
}

/* New shared header (used by assets/nav.js) */
.ng-topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.ng-topbar-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ng-brand{
  display: flex;
  align-items: center;
  gap: 12px;
  color: #0f172a;
  text-decoration: none;
  min-width: 260px;
}
.ng-brand img{
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.ng-brand span{
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.ng-nav{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ng-nav .navbtn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.ng-nav .navbtn:hover{ background: #f1f5f9; }
.ng-nav .navbtn.primary{
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}
.ng-nav .navbtn.primary:hover{ filter: brightness(0.95); }
.ng-nav .navbtn.active{
  background: #111827;
  border-color: #111827;
  color: #fff;
}
.ng-nav .navbtn[hidden]{ display: none !important; }

@media (max-width: 720px){
  .ng-topbar-inner{ padding: 10px 14px; }
  .ng-brand{ min-width: 180px; }
  .ng-brand img{ width: 52px; height: 52px; }
  .ng-brand span{ font-size: 16px; }
  .ng-nav{ gap: 6px; }
  .ng-nav .navbtn{ padding: 7px 10px; font-size: 13px; }
}


/* ===== NorthGrid topbar (centered, one-line chips) ===== */
.ngs-topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #e9eef5;
}
.ngs-topbar__inner{
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.ngs-brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 220px;
}
.ngs-brand img{ display:block; height:40px; width:auto; }
.ngs-brand .ngs-brand__name{ font-weight:700; }
.ngs-topnav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.ngs-topnav .chip,
.ngs-topnav a.chip,
.ngs-topnav button.chip{
  border: 1px solid #d7dee8;
  background: #f8fafc;
}
.ngs-topnav .chip.is-active{
  background:#0f172a;
  color:#fff;
  border-color:#0f172a;
}
@media (max-width: 820px){
  .ngs-topbar__inner{ flex-wrap: wrap; justify-content:center; }
  .ngs-brand{ min-width: unset; }
  .ngs-topnav{ flex-wrap: wrap; justify-content:center; }
}

/* ======================
   Global Top Nav (ngs)
   ====================== */
header#site-header { width: 100%; }

.ngs-topbar {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.ngs-topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center; /* center the whole bar */
  gap: 18px;
}

.ngs-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.ngs-logo {
  width: 44px;
  height: 44px;
  display: block;
}

.ngs-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.ngs-navlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.ngs-navlink:hover { background: #e5e7eb; }
.ngs-navlink.ngs-primary {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}
.ngs-navlink.ngs-primary:hover { background: #111827; }

.ngs-hamburger {
  display: none;
  margin-left: 6px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
}

/* Mobile: collapse into hamburger */
@media (max-width: 760px) {
  .ngs-topbar-inner {
    justify-content: space-between;
  }
  .ngs-nav { display: none; }
  .ngs-hamburger { display: inline-flex; }
  .ngs-menu-open .ngs-nav {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0 6px;
  }
  .ngs-topbar-inner {
    flex-wrap: wrap;
  }
}


.ngs-hamburger .ngs-b1,
.ngs-hamburger .ngs-b2,
.ngs-hamburger .ngs-b3{
  display:block;
  width:18px;
  height:2px;
  background:#111;
  border-radius:2px;
}
.ngs-hamburger .ngs-b2{ margin:4px 0; }

