/* ==========================================================================
   NSRL Site Chrome — two-tier header (identity band + menu bar) + footer
   Colors, fonts and sizes come from assets/common/css/public/tokens.css.
   Buttons and skeleton screens live in assets/common/css/public/public-ui.css.
   ========================================================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nsrl-anchor-offset);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.nsrl-chrome,
.nsrl-chrome *,
.nsrl-chrome-footer,
.nsrl-chrome-footer * {
  box-sizing: border-box;
  font-family: var(--nsrl-font-body);
}

/* Theme list bullets and separator dots: removed from every list in the header and footer */
.nsrl-chrome ul,
.nsrl-chrome li,
.nsrl-chrome-footer ul,
.nsrl-chrome-footer li {
  list-style: none !important;
  margin-left: 0;
  background-image: none !important;
}
.nsrl-chrome ul::before,
.nsrl-chrome ul::after,
.nsrl-chrome li::before,
.nsrl-chrome li::after,
.nsrl-chrome li::marker,
.nsrl-chrome a::before,
.nsrl-chrome a::after,
.nsrl-chrome-footer ul::before,
.nsrl-chrome-footer ul::after,
.nsrl-chrome-footer li::before,
.nsrl-chrome-footer li::after,
.nsrl-chrome-footer li::marker,
.nsrl-chrome-footer a::before,
.nsrl-chrome-footer a::after {
  content: none !important;
  display: none !important;
}

/* -------------------------------------------------------------------------
   Header shell
   ------------------------------------------------------------------------- */
.nsrl-chrome {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--nsrl-z-header);
}

/* -------------------------------------------------------------------------
   Identity band (top tier)
   ------------------------------------------------------------------------- */
.nsrl-chrome__identity {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(11, 61, 36, 0.08);
  transition: background-color var(--nsrl-dur-base) ease, box-shadow var(--nsrl-dur-base) ease;
}

.nsrl-chrome__identity-inner {
  max-width: var(--nsrl-container-wide);
  margin: 0 auto;
  padding: 16px var(--nsrl-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nsrl-chrome__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nsrl-chrome__logo {
  height: 52px;
  width: auto;
  display: block;
}

.nsrl-chrome__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  gap: 3px;
}

.nsrl-chrome .nsrl-chrome__org-name {
  font-family: var(--nsrl-font-display);
  font-size: 22px;
  font-weight: var(--nsrl-fw-display);
  letter-spacing: -0.005em;
  color: var(--nsrl-color-green-900);
  transition: color var(--nsrl-dur-base) ease;
}

.nsrl-chrome__org-subtitle {
  font-size: 12.5px;
  font-weight: var(--nsrl-fw-medium);
  letter-spacing: 0.04em;
  color: var(--nsrl-color-muted);
  transition: color var(--nsrl-dur-base) ease;
}

.nsrl-chrome__identity-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

/* Login / Sign out: text link.  Login + Dashboard: pill button (easy to find the way back to the portal) */
.nsrl-chrome .nsrl-chrome__auth-link {
  font-size: 14px;
  font-weight: var(--nsrl-fw-bold);
  color: var(--nsrl-color-green-900);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--nsrl-dur-fast) ease, border-color var(--nsrl-dur-fast) ease, background-color var(--nsrl-dur-fast) ease, transform var(--nsrl-dur-base) var(--nsrl-ease-out);
}
.nsrl-chrome .nsrl-chrome__auth-link:visited { color: var(--nsrl-color-green-900); }
.nsrl-chrome .nsrl-chrome__auth-link:hover,
.nsrl-chrome .nsrl-chrome__auth-link:focus-visible { border-bottom-color: currentColor; }

html body .nsrl-chrome a.nsrl-chrome__auth-link--primary:is(:link, :visited, :hover, :focus, :active) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--nsrl-radius-pill);
  background: var(--nsrl-color-green-900);
  color: #ffffff;
  text-decoration: none;
}
html body .nsrl-chrome a.nsrl-chrome__auth-link--primary:is(:hover, :focus-visible) {
  background: var(--nsrl-color-green-800);
  transform: translateY(-1px);
}
html body .nsrl-chrome a.nsrl-chrome__auth-link--primary:focus-visible {
  outline: 2px solid var(--nsrl-color-accent);
  outline-offset: 2px;
}

/* Hamburger (mobile only) */
.nsrl-chrome__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.nsrl-chrome__burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--nsrl-color-green-900);
  border-radius: 1px;
  transition: transform var(--nsrl-dur-base) var(--nsrl-ease-out), opacity var(--nsrl-dur-fast) ease;
}
.nsrl-chrome__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nsrl-chrome__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nsrl-chrome__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------------------------------------------------
   Menu bar (bottom tier)
   ------------------------------------------------------------------------- */
.nsrl-chrome__menubar {
  width: 100%;
  background: var(--nsrl-color-green-900);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 0 var(--nsrl-gutter);
  transition: background-color var(--nsrl-dur-base) ease;
}

.nsrl-chrome__nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: 2px;
}

.nsrl-chrome__nav-item {
  position: relative;
}

/* Underline grows from the center on hover; full gold bar on the current page */
html body .nsrl-chrome .nsrl-chrome__nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 15px 18px;
  font-size: 14px;
  font-weight: var(--nsrl-fw-medium);
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  white-space: nowrap;
  background-image: linear-gradient(var(--nsrl-color-gold-400), var(--nsrl-color-gold-400)) !important;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 0% 2px;
  transition: color var(--nsrl-dur-fast) ease, background-size var(--nsrl-dur-base) var(--nsrl-ease-out);
}
html body .nsrl-chrome .nsrl-chrome__nav-link:visited { color: rgba(255, 255, 255, 0.86); }
html body .nsrl-chrome .nsrl-chrome__nav-link:is(:hover, :focus-visible),
html body .nsrl-chrome .nsrl-chrome__nav-item--has-dd:is(:hover, :focus-within, .is-open) > .nsrl-chrome__nav-link {
  color: #ffffff;
  background-size: calc(100% - 36px) 2px;
}
html body .nsrl-chrome .nsrl-chrome__nav-link.is-current {
  color: #ffffff;
  background-size: calc(100% - 36px) 2px;
}
html body .nsrl-chrome .nsrl-chrome__nav-link:focus-visible {
  outline: 2px solid var(--nsrl-color-gold-400);
  outline-offset: -4px;
  border-radius: 6px;
}

/* Chevron on items with a dropdown (a real element: the header removes link pseudo-elements) */
.nsrl-chrome__caret {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.75px solid currentColor;
  border-bottom: 1.75px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.8;
  transition: transform var(--nsrl-dur-base) var(--nsrl-ease-out);
}
.nsrl-chrome__nav-item--has-dd:is(:hover, :focus-within, .is-open) .nsrl-chrome__caret {
  transform: translateY(3px) rotate(-135deg);
}

/* Dropdowns (Laboratories from the API, About Us static) */
.nsrl-chrome__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  min-width: 240px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #ffffff;
  border: 1px solid rgba(11, 61, 36, 0.08);
  border-radius: var(--nsrl-radius-md);
  box-shadow: var(--nsrl-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -6px);
  transition: opacity var(--nsrl-dur-base) var(--nsrl-ease-out), transform var(--nsrl-dur-base) var(--nsrl-ease-out), visibility 0s linear var(--nsrl-dur-base);
  z-index: 10;
}
.nsrl-chrome ul.nsrl-chrome__dropdown::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
}
.nsrl-chrome__nav-item--has-dd:hover .nsrl-chrome__dropdown,
.nsrl-chrome__nav-item--has-dd:focus-within .nsrl-chrome__dropdown,
.nsrl-chrome__nav-item--has-dd.is-open .nsrl-chrome__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity var(--nsrl-dur-base) var(--nsrl-ease-out), transform var(--nsrl-dur-base) var(--nsrl-ease-out), visibility 0s;
}
html body .nsrl-chrome .nsrl-chrome__dropdown li a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: var(--nsrl-fw-medium);
  line-height: 1.35;
  color: var(--nsrl-color-ink);
  text-decoration: none;
  border-radius: var(--nsrl-radius-sm);
  transition: background-color var(--nsrl-dur-fast) ease, color var(--nsrl-dur-fast) ease, padding-left var(--nsrl-dur-base) var(--nsrl-ease-out);
}
html body .nsrl-chrome .nsrl-chrome__dropdown li a:visited { color: var(--nsrl-color-ink); }
html body .nsrl-chrome .nsrl-chrome__dropdown li a:is(:hover, :focus-visible) {
  background: var(--nsrl-color-green-50);
  color: var(--nsrl-color-accent-text);
  padding-left: 18px;
  outline: none;
}
.nsrl-chrome .nsrl-chrome__dropdown li.nsrl-chrome__dropdown-all {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(11, 61, 36, 0.08);
}
html body .nsrl-chrome .nsrl-chrome__dropdown li.nsrl-chrome__dropdown-all a:is(:link, :visited) {
  font-weight: var(--nsrl-fw-bold);
  color: var(--nsrl-color-accent-text);
}
html body .nsrl-chrome .nsrl-chrome__dropdown li a.is-current {
  color: var(--nsrl-color-accent-text);
  font-weight: var(--nsrl-fw-bold);
}

/* -------------------------------------------------------------------------
   Variant: transparent — the landing page header floats over the (light) hero.
   It looks exactly like the public header; only its positioning differs.
   ------------------------------------------------------------------------- */
.nsrl-chrome--transparent {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

/* -------------------------------------------------------------------------
   Desktop public header: one floating glass capsule
   [ mark + name ]   [ menu ]   [ Login / My Dashboard ]
   The identity band and its inner wrapper step out of the layout (display: contents)
   so brand, menu and actions share one row. Mobile keeps the two-part layout below.
   ------------------------------------------------------------------------- */
.nsrl-chrome__mark {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  align-self: center;            /* sits in the middle of the bar, level with the menu and Login */
  width: 40px;
  height: 40px;
  border-radius: 50%;            /* round, same shape as the account icon */
  font-family: var(--nsrl-font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  text-indent: -0.02em;          /* undo the tracking offset so "NS" is optically centred */
  color: var(--nsrl-color-gold-300);
  background: var(--nsrl-color-green-900);
}

@media (min-width: 901px) {
  .nsrl-chrome.nsrl-chrome--public,
  .nsrl-chrome.nsrl-chrome--transparent {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    width: auto;
    max-width: var(--nsrl-container-wide);
    margin: 14px auto 0;
    padding: 8px 10px 8px 10px;
    background: rgba(255, 255, 255, 0.99);   /* near-solid: stays white over the dark hero instead of turning grey */
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    backdrop-filter: saturate(160%) blur(16px);
    border: 1px solid rgba(11, 61, 36, 0.08);
    border-radius: var(--nsrl-radius-pill);
    box-shadow: 0 12px 32px -20px rgba(6, 40, 24, 0.45);
    transition: background-color var(--nsrl-dur-base) ease, box-shadow var(--nsrl-dur-base) ease;
  }
  .nsrl-chrome.nsrl-chrome--public {
    top: 14px;
    margin-left: var(--nsrl-gutter);
    margin-right: var(--nsrl-gutter);
  }
  .nsrl-chrome.nsrl-chrome--transparent {
    top: 14px;
    left: var(--nsrl-gutter);
    right: var(--nsrl-gutter);
    margin: 0 auto;
  }
  .nsrl-chrome.nsrl-chrome--public.is-scrolled,
  .nsrl-chrome.nsrl-chrome--transparent.is-scrolled {
    background: #ffffff;
    box-shadow: 0 16px 40px -18px rgba(6, 40, 24, 0.5);
  }
  @media (min-width: 1360px) {
    .nsrl-chrome.nsrl-chrome--public { margin-left: auto; margin-right: auto; }
  }

  .nsrl-chrome--public .nsrl-chrome__identity,
  .nsrl-chrome--transparent .nsrl-chrome__identity,
  .nsrl-chrome--public .nsrl-chrome__identity-inner,
  .nsrl-chrome--transparent .nsrl-chrome__identity-inner {
    display: contents;
  }
  .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__brand { grid-column: 1; grid-row: 1; gap: 12px; }
  .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__identity-actions {
    grid-column: 3;
    grid-row: 1;
    margin: 0 0 0 8px;
    padding-left: 18px;
    gap: 14px;
    border-left: 1px solid rgba(11, 61, 36, 0.12);
  }
  .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__mark { display: inline-flex; }
  .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__org-name { font-size: 17px; line-height: 1.15; }
  .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__org-subtitle { font-size: 11.5px; letter-spacing: 0.02em; }
  .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__logo { height: 40px; }

  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__menubar {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    padding: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }
  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__menubar {
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
  }
  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__nav {
    gap: 2px;
    align-items: center;
    margin: 0;
    padding: 0;
  }
  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__nav-item {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
  }
  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__nav-label { line-height: 1.2; }
  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__caret { margin-top: -3px; align-self: center; }
  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__nav-link {
    margin: 0;
    line-height: 1.2;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: var(--nsrl-fw-medium);
    letter-spacing: 0;
    color: var(--nsrl-color-green-900);
    background-image: none !important;
    border-radius: var(--nsrl-radius-pill);
    transition: background-color var(--nsrl-dur-fast) ease, color var(--nsrl-dur-fast) ease;
  }
  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__nav-link:visited { color: var(--nsrl-color-green-900); }
  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__nav-link:is(:hover, :focus-visible),
  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__nav-item--has-dd:is(:hover, :focus-within, .is-open) > .nsrl-chrome__nav-link {
    color: var(--nsrl-color-green-900);
    background-color: rgba(11, 61, 36, 0.06);
  }
  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__nav-link.is-current {
    color: var(--nsrl-color-green-900);
    background-color: var(--nsrl-color-sage);
  }
  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__nav-link:focus-visible {
    outline: 2px solid var(--nsrl-color-accent);
    outline-offset: 0;
  }
  .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__dropdown { top: calc(100% + 14px); }
  .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) ul.nsrl-chrome__dropdown::before { top: -16px; height: 16px; }

  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) a.nsrl-chrome__auth-link--primary:is(:link, :visited, :hover, :focus, :active) {
    padding: 12px 22px;
    background: var(--nsrl-color-green-900);
    color: #ffffff;
  }
  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) a.nsrl-chrome__auth-link--primary:is(:hover, :focus-visible) {
    background: var(--nsrl-color-green-800);
  }
}

/* Medium screens: keep the mark, hide the long name so the menu fits */
@media (min-width: 901px) and (max-width: 1239px) {
  .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__brand-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  html body .nsrl-chrome:is(.nsrl-chrome--public, .nsrl-chrome--transparent) .nsrl-chrome__nav-link { padding: 10px 11px; font-size: 13.5px; }
}

/* -------------------------------------------------------------------------
   Account menu (admin + portal headers)
   ------------------------------------------------------------------------- */
.nsrl-account {
  position: relative;
}

.nsrl-account__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  background: transparent;
  border: 1px solid rgba(11, 61, 36, 0.14);
  border-radius: var(--nsrl-radius-pill);
  cursor: pointer;
  color: var(--nsrl-color-green-900);
  transition: background-color var(--nsrl-dur-fast) ease, border-color var(--nsrl-dur-fast) ease;
}
.nsrl-account__toggle:hover,
.nsrl-account__toggle[aria-expanded="true"] {
  background: var(--nsrl-color-green-50);
  border-color: rgba(11, 61, 36, 0.28);
}
.nsrl-account__toggle:focus-visible {
  outline: 2px solid var(--nsrl-color-accent);
  outline-offset: 2px;
}

.nsrl-account__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--nsrl-color-green-900);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: var(--nsrl-fw-bold);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.nsrl-account__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  text-align: left;
}
.nsrl-account__name {
  font-size: 14px;
  font-weight: var(--nsrl-fw-bold);
  color: var(--nsrl-color-green-900);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nsrl-account__role {
  font-size: 12px;
  font-weight: var(--nsrl-fw-medium);
  color: var(--nsrl-color-muted);
}

.nsrl-account__caret {
  width: 8px;
  height: 8px;
  margin: 0 4px 3px 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--nsrl-dur-fast) ease;
}
.nsrl-account__toggle[aria-expanded="true"] .nsrl-account__caret {
  transform: translateY(3px) rotate(-135deg);
}

.nsrl-account__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  margin: 0;
  padding: 6px;
  background: #ffffff;
  border: 1px solid rgba(11, 61, 36, 0.1);
  border-radius: var(--nsrl-radius-md);
  box-shadow: var(--nsrl-shadow-lg);
  z-index: 20;
  animation: nsrl-chrome-pop var(--nsrl-dur-base) var(--nsrl-ease-out);
}
.nsrl-account__menu[hidden] { display: none; }

@keyframes nsrl-chrome-pop {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.nsrl-account__link {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: var(--nsrl-fw-medium);
  color: var(--nsrl-color-ink);
  text-decoration: none;
  border-radius: var(--nsrl-radius-sm);
}
.nsrl-account__link:visited { color: var(--nsrl-color-ink); }
.nsrl-account__link:hover,
.nsrl-account__link:focus { background: var(--nsrl-color-green-50); color: var(--nsrl-color-green-900); }
.nsrl-account__link--signout { border-top: 1px solid rgba(11, 61, 36, 0.08); border-radius: 0 0 var(--nsrl-radius-sm) var(--nsrl-radius-sm); }

/* Public pages, signed in: account icon + "Account" + caret */
html body .nsrl-chrome .nsrl-account--public .nsrl-account__toggle {
  gap: 8px;
  min-height: 0;
  padding: 5px 14px 5px 5px;
  font-family: var(--nsrl-font-body);
  font-size: 14px;
  font-weight: var(--nsrl-fw-bold);
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  color: var(--nsrl-color-green-900);
  background: transparent;
  border: 1px solid rgba(11, 61, 36, 0.14);
  border-radius: var(--nsrl-radius-pill);
  box-shadow: none;
}
html body .nsrl-chrome .nsrl-account--public .nsrl-account__toggle:is(:hover, [aria-expanded="true"]) {
  color: var(--nsrl-color-green-900);
  background: var(--nsrl-color-green-50);
  border-color: rgba(11, 61, 36, 0.28);
}
.nsrl-account__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--nsrl-color-green-900);
  transition: background-color var(--nsrl-dur-fast) ease;
}
.nsrl-account__icon svg { width: 18px; height: 18px; display: block; }
.nsrl-account--public .nsrl-account__toggle:hover .nsrl-account__icon { background: var(--nsrl-color-green-800); }
.nsrl-account--public .nsrl-account__caret { margin: 0 2px 3px 2px; width: 7px; height: 7px; }

.nsrl-account--public .nsrl-account__menu { min-width: 240px; top: calc(100% + 14px); }
.nsrl-chrome .nsrl-account__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(11, 61, 36, 0.08);
}
.nsrl-account__head .nsrl-account__name { max-width: 160px; }
html body .nsrl-chrome a.nsrl-account__link:is(:link, :visited) { color: var(--nsrl-color-ink); text-decoration: none; }
html body .nsrl-chrome a.nsrl-account__link:is(:hover, :focus-visible) { color: var(--nsrl-color-green-900); background: var(--nsrl-color-green-50); text-decoration: none; }
html body .nsrl-chrome .nsrl-account--public a.nsrl-account__link--signout:is(:link, :visited) { color: var(--nsrl-color-red-700); }
html body .nsrl-chrome .nsrl-account--public a.nsrl-account__link--signout:is(:hover, :focus-visible) { color: var(--nsrl-color-red-700); background: var(--nsrl-color-red-100); }
.nsrl-account--public .nsrl-account__link--signout { border-top: 0; color: var(--nsrl-color-red-700); }
.nsrl-account--public .nsrl-account__link--signout:visited { color: var(--nsrl-color-red-700); }
.nsrl-account--public .nsrl-account__link--signout:is(:hover, :focus) { background: var(--nsrl-color-red-100); color: var(--nsrl-color-red-700); }

/* -------------------------------------------------------------------------
   Variants: admin (identity band only) and portal (client menu)
   ------------------------------------------------------------------------- */
.nsrl-chrome--admin .nsrl-chrome__identity,
.nsrl-chrome--portal .nsrl-chrome__identity {
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(11, 61, 36, 0.08);
}
.nsrl-chrome--admin .nsrl-chrome__identity-inner,
.nsrl-chrome--portal .nsrl-chrome__identity-inner {
  max-width: none;
  padding-left: 32px;
  padding-right: 32px;
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.nsrl-chrome-footer {
  position: relative;
  width: 100%;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(8, 127, 135, 0.18) 0%, rgba(8, 127, 135, 0) 55%),
    var(--nsrl-color-green-900);
  color: var(--nsrl-color-on-dark-muted);
  padding: 64px var(--nsrl-gutter) 0;
}
.nsrl-chrome-footer:not(.nsrl-chrome-footer--minimal)::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--nsrl-color-gold-500), var(--nsrl-color-teal-500));
}

.nsrl-chrome-footer__inner {
  max-width: var(--nsrl-container-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--nsrl-color-on-dark-line);
}

.nsrl-chrome-footer .nsrl-chrome-footer__org-name {
  display: block;
  font-family: var(--nsrl-font-display);
  font-size: 20px;
  font-weight: var(--nsrl-fw-display);
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 12px;
}

.nsrl-chrome-footer .nsrl-chrome-footer__text {
  font-size: var(--nsrl-footer-size);
  line-height: var(--nsrl-footer-leading);
  color: var(--nsrl-footer-text);
  margin: 0;
  max-width: 36ch;
}

.nsrl-chrome-footer .nsrl-chrome-footer__heading {
  font-family: var(--nsrl-font-body);
  font-size: var(--nsrl-fs-eyebrow);
  font-weight: var(--nsrl-fw-bold);
  letter-spacing: var(--nsrl-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--nsrl-color-gold-300);
  margin: 0 0 16px 0;
}

.nsrl-chrome-footer__labs-list,
.nsrl-chrome-footer__contact-list,
.nsrl-chrome-footer__legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Every line in the columns gets the same font, size and color (the theme restyles bare <li> text) */
.nsrl-chrome-footer .nsrl-chrome-footer__col li,
.nsrl-chrome-footer .nsrl-chrome-footer__col a {
  font-family: var(--nsrl-font-body) !important;
  font-size: var(--nsrl-footer-size) !important;
  font-weight: var(--nsrl-fw-regular) !important;
  line-height: var(--nsrl-footer-leading) !important;
  color: var(--nsrl-footer-text);
  text-decoration: none;
}
.nsrl-chrome-footer .nsrl-chrome-footer__col a:link,
.nsrl-chrome-footer .nsrl-chrome-footer__col a:visited { color: var(--nsrl-footer-text); }
.nsrl-chrome-footer .nsrl-chrome-footer__col a {
  background-image: linear-gradient(currentColor, currentColor) !important;
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: color var(--nsrl-dur-fast) ease, background-size var(--nsrl-dur-base) var(--nsrl-ease-out);
}
.nsrl-chrome-footer .nsrl-chrome-footer__col a:hover,
.nsrl-chrome-footer .nsrl-chrome-footer__col a:focus-visible { color: #ffffff; background-size: 100% 1px; }
.nsrl-chrome-footer .nsrl-chrome-footer__col li.nsrl-chrome-footer__label {
  margin-top: 6px;
  font-size: var(--nsrl-fs-xs) !important;
  font-weight: var(--nsrl-fw-bold) !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nsrl-color-on-dark-faint);
}

/* Social media row (under the About text) */
.nsrl-chrome-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
html body .nsrl-chrome-footer a.nsrl-chrome-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
  transition: background-color var(--nsrl-dur-fast) ease, border-color var(--nsrl-dur-fast) ease, color var(--nsrl-dur-fast) ease, transform var(--nsrl-dur-base) var(--nsrl-ease-out);
}
html body .nsrl-chrome-footer a.nsrl-chrome-footer__social-link:is(:hover, :focus-visible) {
  background: var(--nsrl-color-gold-500);
  border-color: var(--nsrl-color-gold-500);
  color: var(--nsrl-color-green-950);
  transform: translateY(-2px);
}
html body .nsrl-chrome-footer a.nsrl-chrome-footer__social-link:focus-visible {
  outline: 2px solid var(--nsrl-color-gold-300);
  outline-offset: 2px;
}
.nsrl-chrome-footer__social-link svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.nsrl-chrome-footer__bottom {
  max-width: var(--nsrl-container-wide);
  margin: 0 auto;
  padding: 22px 0;
  font-size: 12.5px;
  color: var(--nsrl-color-on-dark-faint);
  text-align: center;
}

/* Minimal footer (admin + portal) */
.nsrl-chrome-footer--minimal {
  padding: 0 24px;
  background: #ffffff;
  color: var(--nsrl-color-muted);
  border-top: 1px solid rgba(11, 61, 36, 0.1);
}

.nsrl-chrome-footer__minimal-inner {
  max-width: var(--nsrl-container-wide);
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}

.nsrl-chrome-footer__minimal-links {
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}
.nsrl-chrome-footer__minimal-links a {
  color: var(--nsrl-color-muted);
  text-decoration: none;
}
.nsrl-chrome-footer__minimal-links a:visited { color: var(--nsrl-color-muted); }
.nsrl-chrome-footer__minimal-links a:hover { color: var(--nsrl-color-green-900); text-decoration: underline; }

/* Elements that only exist on phones/tablets: hidden on desktop */
.nsrl-chrome__mobile-actions,
.nsrl-chrome-footer__top { display: none; }

/* -------------------------------------------------------------------------
   Responsive — mobile header
   <= 900px: compact top bar (name left, rounded menu button right). The menu opens as a
   full-screen panel under the bar; Login / Dashboard / Sign out sit at the bottom as buttons.
   site.js sets --nsrl-header-h (height of the top bar) and --nsrl-chrome-bar-h (panel start).
   ------------------------------------------------------------------------- */
html.nsrl-chrome-lock,
html.nsrl-chrome-lock body { overflow: hidden; }

@media (max-width: 900px) {
  :root { --nsrl-anchor-offset: calc(var(--nsrl-header-h, 72px) + 8px); }

  .nsrl-chrome__identity-inner {
    padding: 10px 16px;
    min-height: 64px;
    gap: 12px;
    flex-wrap: nowrap;
  }
  .nsrl-chrome__brand { flex: 1 1 auto; min-width: 0; gap: 10px; }
  .nsrl-chrome__brand-text { min-width: 0; gap: 2px; }
  .nsrl-chrome .nsrl-chrome__org-name { font-size: 16px; line-height: 1.15; letter-spacing: 0; }
  .nsrl-chrome__org-subtitle { font-size: 11px; letter-spacing: 0.02em; }
  .nsrl-chrome__logo { height: 40px; }

  .nsrl-chrome--public .nsrl-chrome__identity-actions,
  .nsrl-chrome--transparent .nsrl-chrome__identity-actions { display: none; }

  html body .nsrl-chrome .nsrl-chrome__burger {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    min-height: 0;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: rgba(11, 61, 36, 0.08);
    box-shadow: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
  }
  html body .nsrl-chrome .nsrl-chrome__burger:hover,
  html body .nsrl-chrome .nsrl-chrome__burger:focus { background: rgba(11, 61, 36, 0.14); }
  html body .nsrl-chrome .nsrl-chrome__burger:focus-visible { outline: 2px solid var(--nsrl-color-gold-400); outline-offset: 2px; }
  .nsrl-chrome__burger span { width: 20px; }

  /* Full-screen panel */
  html body .nsrl-chrome .nsrl-chrome__menubar {
    position: fixed;
    top: var(--nsrl-chrome-bar-h, 64px);
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 8px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    background: var(--nsrl-color-green-900);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--nsrl-dur-base) ease, transform var(--nsrl-dur-base) var(--nsrl-ease-out), visibility 0s linear var(--nsrl-dur-base);
  }
  html body .nsrl-chrome.nsrl-chrome__menu-open .nsrl-chrome__menubar {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity var(--nsrl-dur-base) ease, transform var(--nsrl-dur-base) var(--nsrl-ease-out), visibility 0s;
  }

  .nsrl-chrome.nsrl-chrome__menu-open .nsrl-chrome__identity {
    background: var(--nsrl-color-green-900);
    border-bottom-color: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .nsrl-chrome.nsrl-chrome__menu-open .nsrl-chrome__org-name,
  .nsrl-chrome.nsrl-chrome__menu-open .nsrl-chrome__org-subtitle {
    color: #ffffff !important;
    text-shadow: none;
  }
  .nsrl-chrome.nsrl-chrome__menu-open .nsrl-chrome__burger span { background: #ffffff; }
  html body .nsrl-chrome.nsrl-chrome__menu-open .nsrl-chrome__burger { background: rgba(255, 255, 255, 0.14); }

  /* Links */
  .nsrl-chrome__nav { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .nsrl-chrome__nav-item { width: 100%; }
  html body .nsrl-chrome .nsrl-chrome__nav-link {
    justify-content: space-between;
    padding: 18px 4px;
    font-size: 18px;
    font-weight: var(--nsrl-fw-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: normal;
    color: #ffffff;
    background-image: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-tap-highlight-color: transparent;
  }
  html body .nsrl-chrome .nsrl-chrome__nav-link:is(:visited, :hover, :focus) { color: #ffffff; }
  html body .nsrl-chrome .nsrl-chrome__nav-link.is-current { color: var(--nsrl-color-gold-300); }
  html body .nsrl-chrome .nsrl-chrome__nav-link:focus-visible { outline-offset: -2px; }

  .nsrl-chrome__caret { width: 9px; height: 9px; margin: -4px 8px 0 0; border-width: 2px; }
  .nsrl-chrome__nav-item--has-dd:is(:hover, :focus-within) .nsrl-chrome__caret { transform: rotate(45deg); }
  .nsrl-chrome__nav-item--has-dd.is-open .nsrl-chrome__caret { transform: translateY(3px) rotate(-135deg); }

  .nsrl-chrome__dropdown,
  .nsrl-chrome__nav-item--has-dd:hover .nsrl-chrome__dropdown,
  .nsrl-chrome__nav-item--has-dd:focus-within .nsrl-chrome__dropdown {
    position: static;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 0 0 var(--nsrl-radius-md) var(--nsrl-radius-md);
    padding: 4px;
    display: none;
    transition: none;
  }
  .nsrl-chrome ul.nsrl-chrome__dropdown::before { display: none !important; }
  .nsrl-chrome__nav-item--has-dd.is-open .nsrl-chrome__dropdown { display: block; animation: nsrl-chrome-pop var(--nsrl-dur-base) var(--nsrl-ease-out); }
  .nsrl-chrome__dropdown[hidden] { display: none !important; }
  html body .nsrl-chrome .nsrl-chrome__dropdown li a {
    padding: 13px 16px;
    font-size: 15px;
    font-weight: var(--nsrl-fw-medium);
    color: rgba(255, 255, 255, 0.88);
  }
  html body .nsrl-chrome .nsrl-chrome__dropdown li a:visited { color: rgba(255, 255, 255, 0.88); }
  html body .nsrl-chrome .nsrl-chrome__dropdown li a:is(:hover, :focus-visible) { background: rgba(255, 255, 255, 0.06); color: #ffffff; padding-left: 16px; }
  html body .nsrl-chrome .nsrl-chrome__dropdown li a.is-current { color: var(--nsrl-color-gold-300); }
  .nsrl-chrome .nsrl-chrome__dropdown li.nsrl-chrome__dropdown-all { border-top-color: rgba(255, 255, 255, 0.12); }
  html body .nsrl-chrome .nsrl-chrome__dropdown li.nsrl-chrome__dropdown-all a:is(:link, :visited) { color: var(--nsrl-color-gold-300); }

  /* Buttons at the bottom of the panel */
  .nsrl-chrome__mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    padding-top: 28px;
  }
  html body .nsrl-chrome a.nsrl-chrome__mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.7rem 1.35rem;
    font-size: 0.9375rem;
    font-weight: var(--nsrl-fw-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--nsrl-radius-pill);
    -webkit-tap-highlight-color: transparent;
  }
  html body .nsrl-chrome a.nsrl-chrome__mobile-btn--primary:is(:link, :visited, :hover, :focus) {
    background: var(--nsrl-color-gold-500);
    border-color: var(--nsrl-color-gold-500);
    color: var(--nsrl-color-green-950);
  }
  html body .nsrl-chrome a.nsrl-chrome__mobile-btn--outline:is(:link, :visited, :hover, :focus) {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.55);
    color: #ffffff;
  }

  /* Footer (tablet): two columns */
  .nsrl-chrome-footer__inner { grid-template-columns: 1fr 1fr; gap: 36px; }
  .nsrl-chrome-footer__about { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .nsrl-chrome--admin .nsrl-chrome__identity-inner,
  .nsrl-chrome--portal .nsrl-chrome__identity-inner { padding-left: 16px; padding-right: 16px; }
  .nsrl-account__text,
  .nsrl-account__caret { display: none; }
  .nsrl-account__toggle { padding: 3px; }
  .nsrl-chrome-footer__minimal-inner { justify-content: center; text-align: center; }
}

@media (max-width: 360px) {
  .nsrl-chrome .nsrl-chrome__org-name { font-size: 15px; }
  .nsrl-chrome__org-subtitle { font-size: 10.5px; }
}

/* -------------------------------------------------------------------------
   Responsive — mobile footer: one centered column, dividers, big tap targets
   ------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .nsrl-chrome-footer { padding: 48px 20px 0; }

  .nsrl-chrome-footer__inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: 8px;
    border-bottom: 0;
    text-align: center;
  }
  .nsrl-chrome-footer__about { padding-bottom: 28px; }
  .nsrl-chrome-footer .nsrl-chrome-footer__text { max-width: 34rem; margin: 0 auto; }
  .nsrl-chrome-footer__social { justify-content: center; }

  .nsrl-chrome-footer__col {
    padding: 24px 0;
    border-top: 1px solid var(--nsrl-color-on-dark-line);
  }
  .nsrl-chrome-footer .nsrl-chrome-footer__heading { margin-bottom: 8px; }

  .nsrl-chrome-footer__labs-list,
  .nsrl-chrome-footer__contact-list,
  .nsrl-chrome-footer__legal-list { align-items: center; gap: 0; }

  .nsrl-chrome-footer .nsrl-chrome-footer__col li { max-width: 100%; overflow-wrap: anywhere; }
  .nsrl-chrome-footer .nsrl-chrome-footer__col a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 8px;
    background-image: none !important;
  }
  .nsrl-chrome-footer__contact-list li:not(:has(a)) { padding: 4px 0; }

  .nsrl-chrome-footer__bottom {
    padding: 20px 0 8px;
    border-top: 1px solid var(--nsrl-color-on-dark-line);
    line-height: 1.5;
  }

  html body .nsrl-chrome-footer a.nsrl-chrome-footer__top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--nsrl-color-on-dark-line);
    font-size: 0.8125rem;
    font-weight: var(--nsrl-fw-bold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--nsrl-color-on-dark-muted);
  }
  html body .nsrl-chrome-footer a.nsrl-chrome-footer__top:is(:visited, :hover, :focus) { color: #ffffff; }
  .nsrl-chrome-footer__top-arrow { color: var(--nsrl-color-gold-400); }
}

@media (prefers-reduced-motion: reduce) {
  .nsrl-chrome *,
  .nsrl-chrome-footer * { transition: none !important; animation: none !important; }
}
