/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-weight: 700; font-size: var(--fs-sm);
  text-decoration: none; border: 1px solid transparent;
  min-height: 44px; transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.btn--primary { background: var(--color-navy-900); color: var(--color-white); box-shadow: var(--shadow-2); }
.btn--primary:hover { background: var(--color-navy-800); text-decoration: none; box-shadow: var(--shadow-3); transform: translateY(-1px); }
.btn--gold { background: var(--gradient-gold-accent); color: var(--color-navy-950); box-shadow: var(--shadow-2); }
.btn--gold:hover { text-decoration: none; box-shadow: var(--shadow-3); transform: translateY(-1px); }
.btn--secondary { background: var(--color-surface); color: var(--color-heading); border-color: var(--color-border); }
.btn--secondary:hover { background: var(--color-surface-2); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--color-heading); }
.btn--ghost:hover { background: var(--color-surface-2); text-decoration: none; }
/* .btn--tertiary -- lower-emphasis action tier used throughout the CMS
   manager pages (department-cms.js, homepage-cms.js, cms-manager-shared.js:
   Edit/History/Duplicate/Archive/Restore/Cancel-style buttons). This class
   was referenced everywhere those files render but never defined, so every
   one of these buttons fell back to .btn's bare base rule -- no background,
   transparent border -- rendering as a near-invisible, hard-to-see control
   even though its click handler worked fine. Reuses the same tokens
   .btn--ghost/.btn--secondary already use; no new color introduced. */
.btn--tertiary { background: transparent; color: var(--color-heading); border-color: var(--color-border); }
.btn--tertiary:hover { background: var(--color-surface-2); text-decoration: none; }
.btn--sm { padding: var(--space-2) var(--space-3); min-height: 36px; font-size: var(--fs-xs); }
.btn--danger { background: var(--color-danger-bg); color: var(--color-danger); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--color-white);
  padding: 3.5rem 0 3.25rem;
  background:
    radial-gradient(circle at 86% 18%, rgba(137, 196, 235, 0.18), transparent 25%),
    radial-gradient(circle at 72% 82%, rgba(32, 116, 177, 0.22), transparent 35%),
    linear-gradient(118deg, #071b2d 0%, #0d2d4c 48%, #174e79 100%);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.8) 100%);
  opacity: 0.55;
}
.hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -240px;
  top: -230px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 50%;
  box-shadow: 0 0 0 92px rgba(255,255,255,0.018), 0 0 0 184px rgba(255,255,255,0.012);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: clamp(2.5rem, 5vw, 5.5rem);
  align-items: center;
}
.hero__content { max-width: 680px; }
.hero__brandmark {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 1.55rem;
  padding: 0.18rem 0 0.18rem 1rem;
  line-height: 1.05;
}
.hero__brandmark::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd66b 0%, var(--color-gold-400) 55%, rgba(240,188,69,0.45) 100%);
  box-shadow: 0 0 18px rgba(240,188,69,0.24);
}
.hero__brandmark-word {
  color: #fff;
  font-size: clamp(1.2rem, 1.45vw, 1.42rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}
.hero__brandmark-sub {
  color: var(--color-gold-400);
  font-size: clamp(0.78rem, 0.88vw, 0.88rem);
  font-weight: 800;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}
.hero__eyebrow {
  color: rgba(255,255,255,0.84);
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  margin: 0 0 0.95rem;
}
.hero__eyebrow-brand { color: var(--color-gold-400); }
.hero h1 {
  color: #fff;
  max-width: 650px;
  margin: 0 0 1rem;
  font-size: clamp(2.35rem, 3.35vw, 3.55rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero .hero__lead {
  max-width: 600px;
  margin: 0;
  color: rgba(240,246,252,0.9);
  font-size: 1.02rem;
  line-height: 1.62;
}
.hero__search {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 1.55rem;
  max-width: 610px;
}
.hero__search-icon {
  position: absolute;
  left: 1.05rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-navy-700);
  display: flex;
  z-index: 2;
}
.hero__search input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  min-height: 52px;
  padding: 0.9rem 1rem 0.9rem 3rem;
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.98);
  font-size: var(--fs-md);
  box-shadow: 0 14px 34px rgba(1, 17, 31, 0.16);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.hero__search input:focus-visible {
  box-shadow: 0 14px 34px rgba(1, 17, 31, 0.2), 0 0 0 3px rgba(240,188,69,0.42);
  outline: none;
}
.hero__search-submit {
  flex: 0 0 auto;
  justify-content: center;
  min-width: 96px;
  min-height: 52px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(240, 174, 30, 0.17);
}
.hero__actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.hero__actions .btn { min-height: 44px; }
.hero__help-link {
  margin-top: 0.95rem;
  font-size: var(--fs-sm);
}
.hero__help-link a {
  color: rgba(255,255,255,0.8);
  text-decoration-color: rgba(255,255,255,0.38);
  text-underline-offset: 3px;
}
.hero__help-link a:hover { color: #fff; text-decoration-color: var(--color-gold-400); }

/* Department/Academic Services hero text must remain readable on the fixed
   navy hero in both light and dark themes. The homepage uses .hero__lead,
   while department pages render a plain <p> inside .dept-hero-top. */
.hero.no-radius .hero__content { max-width: none; }
.hero.no-radius .dept-hero-top > div { max-width: 780px; min-width: 0; }
.hero.no-radius .dept-hero-top p {
  margin: 0;
  max-width: 720px;
  color: rgba(240,246,252,0.90);
  font-size: 1rem;
  line-height: 1.62;
}
.hero.no-radius .dept-hero-meta { color: rgba(232,241,249,0.82); }

/* A useful right-side destination panel replaces the oversized hero art.
   Branding is intentionally atmospheric: the portal remains the product,
   while the card gives staff four immediate destinations. */
.hero__utility {
  position: relative;
  overflow: hidden;
  padding: 1.35rem;
  border: 1px solid rgba(255,255,255,0.17);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.13), rgba(255,255,255,0.055));
  box-shadow:
    0 30px 70px rgba(2, 18, 35, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.hero__utility::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  top: -98px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 68%);
  pointer-events: none;
}
.hero__utility-watermark {
  position: absolute;
  width: 175px;
  height: 175px;
  right: -18px;
  top: -18px;
  background: rgba(255,255,255,0.12);
  -webkit-mask-image: url('../assets/branding/highlands-forward-icon.png');
  mask-image: url('../assets/branding/highlands-forward-icon.png');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transform: rotate(4deg);
  pointer-events: none;
}
.hero__utility-header {
  position: relative;
  z-index: 1;
  padding: 0.15rem 5.1rem 1.15rem 0.15rem;
}
.hero__utility-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-gold-300, #f4c35a);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.hero__utility h2 {
  margin: 0 0 0.35rem;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.hero__utility-header p {
  margin: 0;
  color: rgba(235,243,251,0.7);
  font-size: 0.84rem;
  line-height: 1.45;
}
.hero__utility-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.hero__utility-link {
  position: relative;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.9rem 2rem 0.9rem 0.95rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 15px;
  background: rgba(5, 27, 48, 0.38);
  color: #fff;
  text-decoration: none;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}
.hero__utility-link:hover,
.hero__utility-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(240,188,69,0.46);
  background: rgba(9, 39, 68, 0.62);
  box-shadow: 0 12px 26px rgba(1,17,31,0.15);
}
.hero__utility-link:focus-visible { outline: 2px solid var(--color-gold-400); outline-offset: 2px; }
.hero__utility-link-title {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero__utility-link-desc {
  margin-top: 0.18rem;
  color: rgba(232,241,249,0.66);
  font-size: 0.74rem;
}
.hero__utility-link-arrow {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-gold-400);
  font-size: 1.05rem;
}
.hero__utility-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.95rem;
  padding: 0.1rem 0.2rem 0;
  color: rgba(236,244,251,0.58);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.035em;
}
.hero__utility-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold-400);
  box-shadow: 0 0 12px rgba(240,188,69,0.4);
}
.hero__utility-footer-sep { opacity: 0.55; }

@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) 350px; gap: 2.5rem; }
  .hero h1 { font-size: clamp(2.25rem, 4vw, 3.1rem); }
}
@media (max-width: 900px) {
  .hero { padding: 2.8rem 0; }
  .hero__grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero__content { max-width: 720px; }
  .hero__utility { max-width: 720px; }
}
@media (max-width: 560px) {
  .hero { padding: 2.25rem 0 2.4rem; }
  .hero__brandmark {
    gap: 4px;
    margin-bottom: 1.35rem;
    padding-left: 0.85rem;
  }
  .hero__brandmark-word { font-size: 1.16rem; }
  .hero__brandmark-sub { font-size: 0.73rem; letter-spacing: 0.075em; }
  .hero__eyebrow { font-size: 0.78rem; margin-bottom: 0.85rem; }
  .hero h1 { font-size: clamp(2.15rem, 10vw, 2.75rem); }
  .hero .hero__lead { font-size: 0.96rem; }
  .hero__search { flex-direction: column; }
  .hero__search-icon { top: 26px; }
  .hero__search input { width: 100%; }
  .hero__search-submit { width: 100%; }
  .hero__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__utility { padding: 1.05rem; border-radius: 20px; }
  .hero__utility-header { padding-right: 4rem; }
  .hero__utility-watermark { width: 135px; height: 135px; right: -30px; top: -24px; }
  .hero__utility-grid { grid-template-columns: 1fr; }
  .hero__utility-link { min-height: 72px; }
}
@media (max-width: 390px) {
  .hero__actions { grid-template-columns: 1fr; }
}

/* ===== Highlands Brain promo card (homepage, beneath the hero) =====
   A small, standalone callout -- deliberately lighter-weight than the
   full "HCCTS Digital Tools" section below it (single row, no grid, no
   skeleton-loading state needed since it's static markup, not fetched).
   Reuses .card's existing surface/border/shadow tokens plus the same
   gold-accent icon treatment as the Digital Tools featured card, so
   light/dark mode and responsive behavior come for free. */
.brain-promo-card {
  display: flex; align-items: center; gap: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: var(--space-4) var(--space-5);
  flex-wrap: wrap;
}
.brain-promo-card__icon {
  width: 44px; height: 44px; border-radius: var(--radius-md); flex-shrink: 0;
  background: var(--gradient-gold-accent); color: var(--color-navy-950);
  display: flex; align-items: center; justify-content: center;
}
.brain-promo-card__body { flex: 1; min-width: 200px; }
.brain-promo-card__title { font-size: var(--fs-md); margin-bottom: 2px; }
.brain-promo-card__desc { color: var(--color-text-muted); font-size: var(--fs-sm); margin: 0; }
.brain-promo-card__action { flex-shrink: 0; }
@media (max-width: 560px) {
  .brain-promo-card { padding: var(--space-4); }
  .brain-promo-card__action { width: 100%; text-align: center; }
}

/* ===== Staff Quick Links (homepage) =====
   Static, high-frequency staff destinations. The first eight stay visible
   for scan speed; six lower-frequency resources live in a native details
   disclosure so mobile never becomes a long legacy-style link list. */
.quick-links-section {
  background: linear-gradient(180deg, var(--color-surface-2) 0%, var(--color-surface) 100%);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.quick-links-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.quick-links-kicker {
  display: block; margin-bottom: var(--space-1);
  color: var(--color-blue-600); font-size: 0.72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.095em;
}
.quick-links-header h2 { margin: 0; font-size: clamp(1.45rem, 2.3vw, 1.9rem); }
.quick-links-header p { margin: var(--space-1) 0 0; color: var(--color-text-muted); font-size: var(--fs-sm); }
.quick-links-count {
  flex-shrink: 0; padding: 0.45rem 0.72rem; border: 1px solid var(--color-border);
  border-radius: 999px; background: var(--color-surface); color: var(--color-text-muted);
  font-size: 0.75rem; font-weight: 700; box-shadow: var(--shadow-1);
}
.quick-links-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3);
}
.quick-link-card {
  min-width: 0; min-height: 92px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center; gap: var(--space-3); padding: var(--space-4); text-decoration: none;
  color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-1);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base), background var(--transition-base);
}
.quick-link-card:hover, .quick-link-card:focus-visible {
  transform: translateY(-2px); box-shadow: var(--shadow-3); border-color: var(--color-sky-400);
}
.quick-link-card:focus-visible { outline: 2px solid var(--color-blue-600); outline-offset: 2px; }
.quick-link-card__icon {
  width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-surface-2); border: 1px solid var(--color-border); color: var(--color-blue-600);
  transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}
.quick-link-card:hover .quick-link-card__icon, .quick-link-card:focus-visible .quick-link-card__icon {
  background: var(--gradient-gold-accent); color: var(--color-navy-950); border-color: transparent;
}
.quick-link-card__body { min-width: 0; display: block; }
.quick-link-card__title {
  display: block; color: var(--color-heading); font-size: 0.91rem; font-weight: 750; line-height: 1.25;
}
.quick-link-card__desc {
  display: block; margin-top: 0.22rem; color: var(--color-text-muted); font-size: 0.74rem; line-height: 1.35;
}
.quick-link-card__arrow {
  align-self: start; color: var(--color-text-muted); font-size: 1rem; font-weight: 800; line-height: 1;
  transition: color var(--transition-base), transform var(--transition-base);
}
.quick-link-card:hover .quick-link-card__arrow, .quick-link-card:focus-visible .quick-link-card__arrow {
  color: var(--color-blue-600); transform: translate(2px, -2px);
}
.quick-links-more { margin-top: var(--space-4); }
.quick-links-more > summary {
  list-style: none; display: flex; align-items: center; gap: var(--space-3); min-height: 48px;
  width: fit-content; max-width: 100%; padding: 0.62rem 0.85rem; cursor: pointer; user-select: none;
  border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface);
  color: var(--color-heading); font-size: var(--fs-sm); font-weight: 750; box-shadow: var(--shadow-1);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}
.quick-links-more > summary::-webkit-details-marker { display: none; }
.quick-links-more > summary:hover, .quick-links-more > summary:focus-visible {
  border-color: var(--color-sky-400); box-shadow: var(--shadow-2); transform: translateY(-1px);
}
.quick-links-more > summary:focus-visible { outline: 2px solid var(--color-blue-600); outline-offset: 2px; }
.quick-links-more__meta { color: var(--color-text-muted); font-size: 0.72rem; font-weight: 600; }
.quick-links-more__chevron { margin-left: auto; color: var(--color-blue-600); font-size: 1rem; transition: transform var(--transition-base); }
.quick-links-more[open] .quick-links-more__chevron { transform: rotate(180deg); }
.quick-links-grid--more { margin-top: var(--space-4); }

@media (max-width: 1180px) {
  .quick-links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .quick-links-header { align-items: flex-start; }
  .quick-links-count { display: none; }
  .quick-links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .quick-link-card { min-height: 112px; grid-template-columns: 38px minmax(0, 1fr); align-items: start; padding: var(--space-3); gap: var(--space-2); }
  .quick-link-card__icon { width: 38px; height: 38px; border-radius: 11px; }
  .quick-link-card__body { align-self: center; }
  .quick-link-card__title { font-size: 0.82rem; }
  .quick-link-card__desc { font-size: 0.68rem; }
  .quick-link-card__arrow { display: none; }
  .quick-links-more > summary { width: 100%; }
}
@media (max-width: 410px) {
  .quick-links-grid { grid-template-columns: 1fr; }
  .quick-link-card { min-height: 82px; grid-template-columns: 38px minmax(0, 1fr); }
  .quick-links-more__meta { display: none; }
}

/* ===== Sites page (HCCTS Sites directory) =====
   Additive-only block: search + filter toolbar, a responsive photo-led
   card grid, and a detail modal. Reuses existing primitives (.card
   surface tokens, .btn, .form-field, .modal-overlay conventions) rather
   than introducing a new visual language. See js/pages/sites.js. */
.sites-toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4);
  margin-bottom: var(--space-3);
}
.sites-search { flex: 1 1 340px; margin-bottom: 0; max-width: 640px; }
.sites-toolbar .filter-bar { margin-bottom: 0; flex: 1 1 auto; }
.sites-filter-clear { align-self: center; }

.grid--sites { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1700px) { .grid--sites { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1024px) { .grid--sites { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--sites { grid-template-columns: minmax(0, 1fr); } }

.site-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}
.site-card:hover, .site-card:focus-within { box-shadow: var(--shadow-3); transform: translateY(-2px); border-color: var(--color-sky-400); }
.site-card__image-wrap { aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-surface-2); }
.site-card__image { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--transition-base); }
.site-card:hover .site-card__image { transform: scale(1.04); }
.site-card__body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); flex: 1; }
.site-card__name { font-size: var(--fs-md); font-weight: 700; color: var(--color-heading); }
.site-card__meta-row { display: flex; align-items: flex-start; gap: var(--space-2); font-size: var(--fs-sm); color: var(--color-text-muted); }
.site-card__meta-row .icon { flex-shrink: 0; margin-top: 2px; color: var(--color-blue-600); }
.site-card__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.site-card__details-btn { flex: 1 1 auto; }
.site-card__directions-btn { display: inline-flex; align-items: center; gap: var(--space-1); }

/* Detail modal */
body.modal-open { overflow: hidden; }
.site-detail-overlay {
  opacity: 0; transition: opacity var(--transition-base);
  align-items: flex-start; padding: var(--space-6) var(--space-4);
  overflow-y: auto;
}
.site-detail-overlay.is-open { opacity: 1; }
.site-detail-modal {
  position: relative; width: 100%; max-width: 640px; margin: auto;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-4);
  overflow: hidden;
}
.site-detail__close-btn {
  position: absolute; top: var(--space-3); right: var(--space-3); z-index: 1;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: rgba(10,27,46,0.55); color: var(--color-white);
  border: none; border-radius: 999px; cursor: pointer;
}
.site-detail__close-btn:hover { background: rgba(10,27,46,0.75); }
.site-detail__image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.site-detail__body { padding: var(--space-6); }
.site-detail__body h2 { font-size: var(--fs-xl); color: var(--color-heading); margin-bottom: var(--space-4); }
.site-detail__row { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); color: var(--color-text); margin-bottom: var(--space-2); }
.site-detail__row .icon { color: var(--color-blue-600); flex-shrink: 0; }
.site-detail__subheading { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--color-text-muted); margin: var(--space-5) 0 var(--space-2); }
.site-detail__list { display: flex; flex-direction: column; gap: var(--space-2); }
.site-detail__contact, .site-detail__resource { font-size: var(--fs-sm); color: var(--color-text); }
.site-detail__actions { margin-top: var(--space-5); }
@media (max-width: 560px) {
  .site-detail-overlay { padding: 0; align-items: flex-end; }
  .site-detail-modal { max-width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 92vh; overflow-y: auto; }
}

/* ===== Card primitive ===== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.card--padded { padding: var(--space-5); }
.card--interactive:hover, .card--interactive:focus-visible { box-shadow: var(--shadow-3); transform: translateY(-2px); }

/* ===== Stat / metric card ===== */
.stat-card {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: var(--space-2);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.stat-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.stat-card__icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--color-white); margin-bottom: var(--space-2); }
.stat-card__value { font-size: var(--fs-2xl); font-weight: 800; color: var(--color-heading); line-height: 1; letter-spacing: var(--ls-tight); }
.stat-card__label { font-size: var(--fs-sm); color: var(--color-text-muted); font-weight: 600; }

/* Descriptive glance card -- for cards without a real number to show
   (per the rule against inventing metrics), a title + description +
   action link instead of a stat. Distinct visual weight from the
   numeric stat-card above so the grid doesn't look identical tile to
   tile. */
.glance-card {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: var(--space-2);
  text-decoration: none; color: inherit;
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}
.glance-card:hover, .glance-card:focus-visible { box-shadow: var(--shadow-3); transform: translateY(-2px); text-decoration: none; }
.glance-card__icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-2); }
.glance-card__title { font-size: var(--fs-md); font-weight: 700; color: var(--color-heading); }
.glance-card__desc { font-size: var(--fs-sm); color: var(--color-text-muted); margin: 0; flex: 1; }
.glance-card__action { font-size: var(--fs-xs); font-weight: 700; color: var(--color-blue-600); text-transform: uppercase; letter-spacing: var(--ls-wide); margin-top: var(--space-1); }
.glance-card--sky { background: var(--color-sky-100); border-color: transparent; color: var(--color-gray-900); }
.glance-card--sky .glance-card__icon { background: var(--color-blue-600); color: var(--color-white); }
.glance-card--gold { background: var(--color-gold-100); border-color: transparent; color: var(--color-gray-900); }
.glance-card--gold .glance-card__icon { background: var(--gradient-gold-accent); color: var(--color-navy-950); }
.glance-card--sky .glance-card__title, .glance-card--gold .glance-card__title { color: var(--color-navy-900); }
.glance-card--sky .glance-card__desc, .glance-card--gold .glance-card__desc { color: #56606f; }
.glance-card--navy { background: var(--color-navy-900); border-color: transparent; color: var(--color-white); }
.glance-card--navy .glance-card__title { color: var(--color-white); }
.glance-card--navy .glance-card__desc { color: #c9d6e6; }
.glance-card--navy .glance-card__icon { background: rgba(255,255,255,0.12); color: var(--color-gold-400); }
.glance-card--navy .glance-card__action { color: var(--color-gold-400); }

/* ===== Action tile ===== */
.action-tile {
  display: flex; align-items: flex-start; gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  text-decoration: none; color: inherit;
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
  height: 100%;
}
.action-tile:hover, .action-tile:focus-visible {
  box-shadow: var(--shadow-3); transform: translateY(-2px); border-color: var(--color-sky-400); text-decoration: none;
}
.action-tile__icon {
  width: 44px; height: 44px; border-radius: var(--radius-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: var(--color-white);
  background: var(--color-navy-800);
}
.action-tile__body { flex: 1; min-width: 0; }
.action-tile__title { font-weight: 700; color: var(--color-heading); font-size: var(--fs-md); margin-bottom: 2px; display: flex; align-items: center; gap: var(--space-2); }
.action-tile__desc { font-size: var(--fs-sm); color: var(--color-text-muted); margin: 0; }
.action-tile__arrow { color: var(--color-text-muted); flex-shrink: 0; transition: transform var(--transition-fast); align-self: center; }
.action-tile:hover .action-tile__arrow { transform: translateX(3px); color: var(--color-heading); }

/* Accent presets -- controlled brand set, not random loud colors */
.accent-navy { background: var(--color-navy-800); }
.accent-blue { background: var(--color-blue-600); }
.accent-gold { background: var(--gradient-gold-accent); color: var(--color-navy-950); }
.accent-gray { background: var(--color-gray-500); }
.accent-sky { background: var(--color-sky-400); color: var(--color-navy-950); }

/* ===== Department card ===== */
.dept-card {
  display: flex; flex-direction: column;
  padding: var(--space-5);
  text-decoration: none; color: inherit; height: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
  position: relative;
}
.dept-card:hover, .dept-card:focus-visible { box-shadow: var(--shadow-3); transform: translateY(-2px); border-color: var(--color-sky-400); }
.dept-card__icon { width: 44px; height: 44px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4); color: var(--color-white); }
.dept-card__name { font-size: var(--fs-md); font-weight: 700; color: var(--color-heading); margin-bottom: var(--space-2); padding-right: var(--space-6); }
.dept-card__desc { font-size: var(--fs-sm); color: var(--color-text-muted); flex: 1; margin-bottom: 0; }
.dept-card__meta { margin-top: var(--space-4); display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.dept-card__arrow { position: absolute; top: var(--space-5); right: var(--space-5); color: var(--color-text-muted); transition: transform var(--transition-fast); }
.dept-card:hover .dept-card__arrow { transform: translateX(3px); color: var(--color-heading); }

/* ===== Resource card (department page) ===== */
.resource-card {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}
.resource-card:hover { box-shadow: var(--shadow-2); border-color: var(--color-sky-400); }
.resource-card__icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--color-sky-100); color: var(--color-blue-600); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.resource-card__body { flex: 1; min-width: 0; }
.resource-card__title { font-weight: 700; color: var(--color-heading); font-size: var(--fs-sm); display: flex; align-items: center; gap: var(--space-2); overflow-wrap: anywhere; }
.resource-card__desc { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 2px; overflow-wrap: anywhere; }
.resource-card__action { flex-shrink: 0; color: var(--color-text-muted); overflow-wrap: anywhere; }

/* Narrow-screen fix (shared by every department, not HR-specific): the
   card was a single flex row with the action button's `flex-shrink: 0`
   holding it at full intrinsic width -- on a narrow viewport with a
   long button label (see the HR section rebuild, e.g. "View Open
   Positions") there was no room left for icon+body, and the button
   could be pushed outside the visible viewport instead of wrapping.
   Below 560px: icon+body become their own row (body still
   `minmax(0, 1fr)` so long titles/descriptions wrap in place instead of
   forcing width), and the action button moves to its own full-width
   row below them, safely within the card's padding either way. */
@media (max-width: 560px) {
  .resource-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon body" "action action";
    align-items: start;
    gap: var(--space-2) var(--space-3);
  }
  .resource-card__icon { grid-area: icon; }
  .resource-card__body { grid-area: body; min-width: 0; }
  .resource-card__action {
    grid-area: action; width: 100%; justify-content: center; text-align: center;
    margin-top: var(--space-2);
  }
}

.resource-card--featured { border: 1px solid var(--color-gold-500); background: var(--color-surface); box-shadow: var(--shadow-2); }
.resource-card--featured .resource-card__icon { background: var(--gradient-gold-accent); color: var(--color-navy-950); }

/* Momentary highlight when a search deep link scrolls to a specific
   resource card inside a tab panel. */
.resource-card--highlighted { outline: 3px solid var(--color-gold-500); outline-offset: 2px; }

/* ===== Department tabs (Academic Services) ===== */
.dept-tabs-wrap { margin-bottom: var(--space-5); }
.dept-tabs {
  display: flex; gap: var(--space-2); overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--color-border); padding-bottom: 0;
  scrollbar-width: thin;
}
.dept-tab {
  flex: 0 0 auto; white-space: nowrap;
  padding: var(--space-3) var(--space-4);
  background: none; border: none; border-bottom: 3px solid transparent;
  font-weight: 700; font-size: var(--fs-sm); color: var(--color-text-muted);
  cursor: pointer; transition: color var(--transition-fast), border-color var(--transition-fast);
}
.dept-tab:hover { color: var(--color-heading); }
.dept-tab:focus-visible { outline: 2px solid var(--color-blue-500); outline-offset: -2px; border-radius: var(--radius-sm); }
.dept-tab--active, .dept-tab[aria-selected="true"] { color: var(--color-heading); border-bottom-color: var(--color-gold-500); }
@media (max-width: 640px) {
  /* Horizontally scrollable row with a visible affordance: the next tab
     is intentionally left partially visible at the viewport edge rather
     than an even, alignment that hides there's more to scroll. */
  .dept-tabs { padding-right: var(--space-6); }
}

.dept-section--callout { background: var(--color-surface-2); border-radius: var(--radius-lg); padding: var(--space-5); }

.data-table__totals-row td { font-weight: 700; border-top: 2px solid var(--color-border-strong); }

/* ===== System card (Custom Systems / Digital Tools) ===== */
.system-card {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: var(--space-3);
  min-width: 0;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.system-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.system-card__header { display: flex; align-items: flex-start; gap: var(--space-3); min-width: 0; }
.system-card__icon { width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--color-navy-800); color: var(--color-white); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.system-card__title-group { display: flex; flex-direction: column; min-width: 0; }
.system-card__name { font-weight: 700; color: var(--color-heading); font-size: var(--fs-md); overflow-wrap: break-word; }
.system-card__dept { font-size: var(--fs-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: var(--ls-wide); font-weight: 600; }
.system-card__subtitle { font-size: var(--fs-xs); color: var(--color-text-muted); font-weight: 500; }
.system-card__status-badge { margin-left: var(--space-2); vertical-align: middle; white-space: nowrap; }
.system-card__purpose { font-size: var(--fs-sm); color: var(--color-text-muted); margin: 0; flex: 1; }
.system-card__action { align-self: flex-start; }

/* ===== Highlands Brain featured card (Digital Tools page) =====
   A single, statically-authored card kept OUTSIDE #tools-grid (which
   tools.js fully replaces on every render/filter) so it can never be
   wiped out by, or accidentally mixed into, the data-driven Digital
   Tool cards below it. Reuses every existing .system-card /
   .badge token -- nothing here introduces a new color or spacing
   scale, so light/dark mode and the page's existing responsive
   breakpoints apply automatically. */
.tools-featured-row { margin-bottom: var(--space-4); }
.system-card--featured {
  position: relative;
  max-width: 340px;
  padding: var(--space-4);
  border-color: var(--color-gold-500);
  box-shadow: 0 0 0 1px rgba(232,169,31,0.18), var(--shadow-1);
}
.system-card__featured-badge { position: absolute; top: var(--space-3); right: var(--space-3); font-size: 10px; padding: 2px 10px; }
.system-card__icon--featured { background: var(--gradient-gold-accent); color: var(--color-navy-950); }
.badge--gold { background: var(--gradient-gold-accent); color: var(--color-navy-950); }
@media (max-width: 640px) {
  .system-card--featured { max-width: 100%; }
}

/* ===== Calendar card (Calendars page) ===== */
.grid--calendars { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
@media (max-width: 1024px) { .grid--calendars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid--calendars { grid-template-columns: minmax(0, 1fr); } }

.calendar-card {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: var(--space-3);
  min-width: 0; height: 100%;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.calendar-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.calendar-card__header { display: flex; align-items: flex-start; gap: var(--space-3); min-width: 0; }
.calendar-card__icon { width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--color-navy-800); color: var(--color-white); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.calendar-card__title { font-weight: 700; color: var(--color-heading); font-size: var(--fs-md); overflow-wrap: break-word; }
.calendar-card__desc { font-size: var(--fs-sm); color: var(--color-text-muted); margin: 0; flex: 1; }
.calendar-card__warning { font-size: var(--fs-xs); color: var(--color-heading); background: var(--color-gold-100, rgba(232,169,31,0.15)); border: 1px solid rgba(232,169,31,0.4); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }
.calendar-card__action { align-self: stretch; justify-content: center; }

/* ===== Contact card ===== */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
@media (max-width: 640px) { .contact-list { grid-template-columns: minmax(0, 1fr); } }
.contact-card { padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.contact-card__name { font-weight: 700; color: var(--color-heading); }
.contact-card__title { font-size: var(--fs-xs); color: var(--color-text-muted); margin-bottom: var(--space-2); }
.contact-card__row { font-size: var(--fs-sm); overflow-wrap: anywhere; }
/* Named-staff contact cards get an initials avatar -- the Staff
   Portal's existing fallback-avatar treatment (see
   .sidebar__user-avatar), never a fabricated photograph. The
   Department Office card (no `--person` modifier) is unaffected. */
.contact-card--person { display: flex; align-items: flex-start; gap: var(--space-3); }
.contact-card__avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--gradient-gold-accent); color: var(--color-navy-950);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: var(--fs-xs);
}
.contact-card__body { min-width: 0; flex: 1; }

/* Optional intro prose for a whole category tab (e.g. "New Employee
   Resources", "NAVEX") or one of its sub-groups (e.g. Benefits' "COBRA
   Information") -- reuses the same rich-text look as the department
   overview text. Bullet paragraphs (rendered as <ul>/<li> by
   renderRichText) get minimal list styling since nothing in base.css
   otherwise touches list markup inside prose. */
.dept-overview-text ul { margin: 0 0 var(--space-3); padding-left: var(--space-5); }
.dept-overview-text li { margin-bottom: var(--space-2); }
.dept-subsection__desc { margin-bottom: var(--space-4); }
.dept-subsection__group { margin-bottom: var(--space-5); }
.dept-subsection__group:last-child { margin-bottom: 0; }
.dept-subsection__group-title { font-size: var(--fs-sm); font-weight: 700; color: var(--color-heading); margin-bottom: var(--space-2); overflow-wrap: anywhere; }
.dept-subsection__group-desc { font-size: var(--fs-sm); margin-bottom: var(--space-3); }

/* Optional per-link bullet detail, shown inside a resource card below
   its one-line description (e.g. EAP's benefit list, Frontline
   Central's Time & Attendance / Absence Management / Professional
   Growth groups). */
.resource-card__details { margin: var(--space-2) 0 0; padding-left: var(--space-4); font-size: var(--fs-xs); color: var(--color-text-muted); overflow-wrap: anywhere; }
.resource-card__details li { margin-bottom: 2px; }
.resource-card__details-group { margin-top: var(--space-2); }
.resource-card__details-heading { font-size: var(--fs-xs); font-weight: 700; color: var(--color-heading); margin-top: var(--space-2); overflow-wrap: anywhere; }

/* ===== Announcement card ===== */
.announcement-card { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); background: var(--color-info-bg); color: var(--color-info); border: 1px solid transparent; }
.announcement-card--high-priority { background: var(--color-warning-bg); color: var(--color-warning); }
.announcement-card__icon { color: var(--color-info); flex-shrink: 0; }
.announcement-card--high-priority .announcement-card__icon { color: var(--color-warning); }

/* ===== Badges & status pills ===== */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 3px var(--space-3); border-radius: var(--radius-full);
  font-size: var(--fs-xs); font-weight: 700;
}
.badge--info { background: var(--color-info-bg); color: var(--color-info); }
.badge--warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge--success { background: var(--color-success-bg); color: var(--color-success); }
.badge--danger { background: var(--color-danger-bg); color: var(--color-danger); }
.badge--neutral { background: var(--color-surface-2); color: var(--color-gray-700); }

.status-pill { display: inline-flex; align-items: center; padding: 4px var(--space-3); border-radius: var(--radius-full); font-size: var(--fs-xs); font-weight: 700; text-transform: capitalize; }
.status-submitted, .status-under_review { background: var(--color-info-bg); color: var(--color-info); }
.status-clarification_needed, .status-on_hold { background: var(--color-warning-bg); color: var(--color-warning); }
.status-approved, .status-assigned, .status-in_progress { background: var(--color-gold-100); color: var(--color-gold-700-text); }
.status-completed { background: var(--color-success-bg); color: var(--color-success); }
.status-declined, .status-cancelled { background: var(--color-danger-bg); color: var(--color-danger); }
.status-draft { background: var(--color-surface-2); color: var(--color-gray-700); }

/* ===== Forms ===== */
.form-field { margin-bottom: var(--space-5); }
.form-field label { display: block; font-weight: 700; font-size: var(--fs-sm); color: var(--color-heading); margin-bottom: var(--space-2); }
.form-field .field-hint { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: var(--space-1); }
.form-field .field-error { font-size: var(--fs-xs); color: var(--color-danger); margin-top: var(--space-1); display: flex; align-items: center; gap: var(--space-1); }
.form-field input[type="text"], .form-field input[type="email"], .form-field input[type="date"],
.form-field select, .form-field textarea {
  width: 100%; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--color-text); min-height: 46px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--color-blue-500); }
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field input[aria-invalid="true"], .form-field select[aria-invalid="true"], .form-field textarea[aria-invalid="true"] { border-color: var(--color-danger); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-6); }

/* ===== CMS manager form field (.field / .field__label / .field__input) =====
   A second, BEM-style naming convention for form fields used throughout
   the CMS manager pages (cms-manager-shared.js, department-cms.js,
   homepage-cms.js) -- distinct from the older .form-field convention
   above, but never given its own CSS, so every one of these labels/
   inputs/selects/textareas across all eight CMS manager admin pages
   rendered with bare browser-default styling instead of the rest of the
   app's form-control look. Mirrors .form-field's exact visual treatment
   (same tokens, same sizing) so both conventions read identically. */
.field { display: block; margin-bottom: var(--space-4); }
.field__label { display: block; font-weight: 700; font-size: var(--fs-sm); color: var(--color-heading); margin-bottom: var(--space-2); }
.field__input {
  width: 100%; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--color-text); min-height: 46px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.field__input:focus { border-color: var(--color-blue-500); }
textarea.field__input { min-height: 100px; resize: vertical; }
.field--checkbox { display: flex; align-items: center; gap: var(--space-2); font-weight: 600; }
.field--checkbox .field__label { margin-bottom: 0; font-weight: 600; }

/* ===== CMS manager content-section tabs (.tabs / .tab) =====
   Same gap as .field above -- department-cms.js's own content-section
   tab bar (contacts/links/faqs/etc, distinct from the Edit Department
   page's .edit-dept-tabs) had no CSS at all. Mirrors .edit-dept-tabs'
   exact treatment. */
.tabs { display: flex; flex-wrap: wrap; gap: var(--space-1); border-bottom: 1px solid var(--color-border); margin-bottom: var(--space-4); }
.tab {
  padding: var(--space-2) var(--space-3);
  border: none; background: none; cursor: pointer;
  font-weight: 600; font-size: 14px; color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
}
.tab--active, .tab[aria-selected="true"] { color: var(--color-heading); border-bottom-color: var(--color-gold-500); }
.tab:focus-visible { outline: 2px solid var(--color-blue-500); outline-offset: 2px; }

/* ===== Resource list rows (.resource-list / .resource-row) =====
   Contacts/Links display rows -- used by the Edit Department page
   (edit-department.js, department-editor.js's legacy stub) and by the
   Quick Preview modal built on top of them. Also had no CSS: rendered
   as a bare, unstyled <ul>/<li> list. */
.resource-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.resource-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
}
.resource-row__title { font-weight: 700; color: var(--color-heading); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.resource-row__desc { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 2px; overflow-wrap: anywhere; }
.resource-row > * { min-width: 0; max-width: 100%; }
@media (max-width: 560px) {
  .resource-row { flex-direction: column; }
  .resource-row > .flex { width: 100%; }
  .resource-row > .flex .btn { flex: 1 1 auto; justify-content: center; }
}

/* ===== FAQ display (.faq-item) ===== */
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-2); background: var(--color-surface); }
.faq-item summary { cursor: pointer; font-weight: 700; color: var(--color-heading); font-size: var(--fs-sm); }
.faq-item p { margin: var(--space-2) 0 0; color: var(--color-text-muted); font-size: var(--fs-sm); }

/* ===== Bare department-page content section (.dept-section) =====
   .dept-section--callout and .dept-section-nav (both already styled
   above) are variants of this base class -- the base itself, used
   plainly for "About [Department]" and other department-page sections,
   had no rule of its own. */
.dept-section { margin-bottom: var(--space-6); }
.dept-section h3 { margin-bottom: var(--space-3); }

/* ===== Standalone search page's own search bar (.header-search) =====
   Distinct from .hero__search (homepage hero, dark background) -- this
   is search.html's own top-of-page input, on a plain light/dark surface,
   and had no styling of its own. */
.header-search { display: flex; gap: var(--space-3); align-items: stretch; max-width: 760px; margin-bottom: var(--space-4); }
.header-search__field { position: relative; flex: 1 1 auto; min-width: 0; }
.header-search__icon {
  position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%);
  color: var(--color-text-muted); display: flex; align-items: center; pointer-events: none;
}
.header-search input {
  width: 100%; padding: var(--space-3) var(--space-4) var(--space-3) calc(var(--space-4) + 25px);
  border: 1px solid var(--color-border); border-radius: var(--radius-full);
  background: var(--color-surface); color: var(--color-text); min-height: 50px;
  font-size: var(--fs-md); box-shadow: var(--shadow-1);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.header-search input:hover { border-color: var(--color-border-strong); }
.header-search input:focus-visible {
  outline: none; border-color: var(--color-blue-500);
  box-shadow: 0 0 0 3px rgba(47,143,217,0.16), var(--shadow-2);
}
.header-search__button {
  min-width: 132px; min-height: 50px; padding: 0 12px 0 18px;
  border-radius: var(--radius-full); display: inline-flex; align-items: center;
  justify-content: center; gap: 10px; font-weight: 800; letter-spacing: .01em;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(135deg, var(--color-navy-900), var(--color-navy-800));
  box-shadow: 0 7px 18px rgba(15,37,64,.18), 0 2px 5px rgba(15,37,64,.10);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.header-search__button:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-navy-800), var(--color-navy-700));
  box-shadow: 0 10px 24px rgba(15,37,64,.22), 0 3px 7px rgba(15,37,64,.12);
  transform: translateY(-1px);
}
.header-search__button:focus-visible { outline: none; box-shadow: var(--shadow-focus), var(--shadow-3); }
.header-search__button-icon {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 28px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-navy-950); background: var(--gradient-gold-accent);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
  transition: transform .18s ease;
}
.header-search__button:hover:not(:disabled) .header-search__button-icon { transform: translateX(2px); }
.header-search__button-spinner {
  display: none; width: 20px; height: 20px; flex: 0 0 20px;
  border: 2px solid rgba(255,255,255,.38); border-top-color: var(--color-white);
  border-radius: 50%; animation: search-spin .7s linear infinite;
}
.header-search__button.is-loading { padding-right: 18px; }
.header-search__button.is-loading .header-search__button-icon { display: none; }
.header-search__button.is-loading .header-search__button-spinner { display: inline-block; }
.header-search__button:disabled { cursor: wait; opacity: .82; transform: none; }

.search-loading {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-7) var(--space-5);
  text-align: center;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-surface-1);
  color: var(--color-text-muted);
}
.search-loading__spinner {
  width: 38px;
  height: 38px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-blue-500);
  border-radius: 50%;
  animation: search-spin .75s linear infinite;
}
.search-loading__title { color: var(--color-text); font-weight: 700; font-size: var(--fs-md); }
@keyframes search-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .search-loading__spinner { animation: none; border-top-color: var(--color-border); } }
@media (max-width: 640px) {
  .header-search { flex-direction: column; }
  .header-search__button { width: 100%; }
}

/* ===== Bare admin <select>/toggle controls without a .form-field wrapper
   (.role-select, .status-select, .system-select, .system-toggle) =====
   users.js / editor.js / custom-systems-admin.js render these as plain
   selects/checkboxes with no wrapper class, so they had none of the
   rest of the app's form-control styling. */
.role-select, .status-select, .system-select {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--color-text);
  min-height: 38px; font-size: var(--fs-sm);
}
.system-toggle { width: 18px; height: 18px; accent-color: var(--color-navy-900); }

/* ===== Attachment upload control ===== */
.upload-field {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3);
  padding: var(--space-3); border: 1px dashed var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface-2);
}
.upload-field__input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.upload-field__trigger { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.upload-field__input:focus-visible + .upload-field__trigger { outline: 2px solid var(--color-blue-500); outline-offset: 2px; }
.upload-field__status { font-size: var(--fs-sm); color: var(--color-text-muted); flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.upload-field__remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--radius-md); border: 1px solid var(--color-border);
  background: var(--color-surface); color: var(--color-text-muted); cursor: pointer;
}
.upload-field__remove:hover { color: var(--color-danger); border-color: var(--color-danger); }
.upload-field__remove:focus-visible { outline: 2px solid var(--color-blue-500); outline-offset: 2px; }
.upload-field__progress { margin-top: var(--space-2); height: 6px; border-radius: 999px; background: var(--color-surface-2); overflow: hidden; }
.upload-field__progress-bar { height: 100%; width: 0%; background: var(--color-blue-500); transition: width var(--transition-fast); }
.upload-field--disabled { opacity: 0.6; }

/* Request-type selection cards */
.type-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--space-3); }
@media (max-width: 768px) { .type-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 480px) { .type-card-grid { grid-template-columns: minmax(0,1fr); } }
.type-card {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface);
  cursor: pointer; text-align: left; font-size: var(--fs-sm); font-weight: 600; color: var(--color-heading);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.type-card:hover { border-color: var(--color-sky-400); }
.type-card.is-selected { border-color: var(--color-blue-500); background: var(--color-sky-100); color: var(--color-navy-900); }
.type-card__icon { color: var(--color-blue-600); flex-shrink: 0; }

/* Progress steps */
.step-progress { display: flex; gap: var(--space-2); margin-bottom: var(--space-6); }
.step-progress__step { flex: 1; height: 6px; border-radius: var(--radius-full); background: var(--color-surface-3); }
.step-progress__step.is-complete, .step-progress__step.is-active { background: var(--color-blue-500); }

/* ===== Data table ===== */
/* .table-wrap -- optional horizontal scroll container for wide data
 * tables in admin managers (Sites Manager, Academic Services version
 * history). On phones the .data-table below already collapses to a
 * stacked card layout (thead hidden, rows become blocks), so this
 * wrapper is a no-op there; it only kicks in if a table is ever wider
 * than its column at an in-between width. Token-based, so it respects
 * light/dark automatically. */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-1); }
.data-table th, .data-table td { padding: var(--space-3) var(--space-4); text-align: left; border-bottom: 1px solid var(--color-border); font-size: var(--fs-sm); }
.data-table th { background: var(--color-surface-1); font-weight: 700; color: var(--color-heading); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-wide); }
.data-table tbody tr { transition: background var(--transition-fast); }
.data-table tbody tr:hover { background: var(--color-surface-1); }
.data-table tr:last-child td { border-bottom: none; }

@media (max-width: 640px) {
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: var(--space-3); padding: var(--space-2) 0; box-shadow: var(--shadow-1); }
  .data-table td { border-bottom: none; padding: var(--space-2) var(--space-4); }
  .data-table td::before { content: attr(data-label); display: block; font-size: var(--fs-xs); font-weight: 700; color: var(--color-text-muted); margin-bottom: 2px; }
}

/* ===== Empty / error / loading states ===== */
.empty-state, .error-state {
  padding: var(--space-7) var(--space-5);
  text-align: center;
  border-radius: var(--radius-lg);
}
.empty-state { color: var(--color-text-muted); background: var(--color-surface-1); border: 1px dashed var(--color-border-strong); font-size: var(--fs-sm); }
.empty-state__icon { color: var(--color-gray-500); margin-bottom: var(--space-3); }
.error-state { background: var(--color-danger-bg); color: var(--color-danger); border: 1px solid transparent; }
.error-state__icon { margin-bottom: var(--space-3); }
.error-state__retry-btn { margin-top: var(--space-4); }

.skeleton {
  background: linear-gradient(90deg, var(--color-surface-2) 25%, var(--color-surface-3) 37%, var(--color-surface-2) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; background: var(--color-surface-2); } }

.skeleton-card { padding: var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.skeleton-card .skeleton + .skeleton { margin-top: var(--space-3); }

/* ===== Toast ===== */
.toast-region { position: fixed; bottom: var(--space-5); right: var(--space-5); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--space-2); max-width: 360px; }
.toast {
  background: var(--color-navy-900); color: var(--color-white);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  box-shadow: var(--shadow-4); font-size: var(--fs-sm); font-weight: 600;
  display: flex; align-items: center; gap: var(--space-2);
  animation: toast-in var(--transition-base);
}
.toast--success { background: var(--color-success); }
.toast--error { background: var(--color-danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 560px) { .toast-region { left: var(--space-3); right: var(--space-3); bottom: var(--space-3); max-width: none; } }

/* ===== Modal ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,27,46,0.55); z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; padding: var(--space-4); }
/* Without this, the `hidden` attribute (browser default: display:none,
   specificity 0,1,0) loses the cascade to the `.modal-overlay` class rule
   above (also 0,1,0 -- a tie goes to whichever rule comes later, and
   author CSS always comes after the UA default sheet). The practical
   effect: a `<div class="modal-overlay ..." hidden>` sitting in static
   HTML markup (as opposed to one created fresh by JS only when opened)
   stays `display: flex` -- a full-viewport, fixed, invisible (opacity:0
   from the specific overlay's own closed-state rule), fully clickable
   (pointer-events defaults to auto) layer sitting in front of the entire
   page from first load, silently swallowing every click anywhere on that
   page. Confirmed via document.elementFromPoint() on the Sites page:
   clicking directly on "View Site Details" or "Get Directions" hit this
   overlay div, not the button/anchor underneath, on every card. This
   selector's specificity (0,2,0) beats the bare class rule regardless of
   source order, so `hidden` actually hides it again. */
.modal-overlay[hidden] { display: none; }
.modal { background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-4); max-width: 480px; width: 100%; padding: var(--space-6); }
.modal__title { margin-bottom: var(--space-3); }
.modal__actions { display: flex; gap: var(--space-3); justify-content: flex-end; margin-top: var(--space-5); }

/* ===== Filter bar ===== */
.filter-bar { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: flex-end; margin-bottom: var(--space-5); }
.filter-bar .form-field { margin-bottom: 0; min-width: 160px; }

/* ===== Priority panel (Emergency & Staff Resources) ===== */
.signin-prompt {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  background: var(--color-sky-100);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}
.signin-prompt__icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-blue-600);
  color: var(--color-white);
  display: flex; align-items: center; justify-content: center;
}
.signin-prompt__body { flex: 1; min-width: 0; }
.signin-prompt__body strong { color: var(--color-navy-900); font-size: var(--fs-md); }
.signin-prompt__body p { margin: var(--space-1) 0 0; color: #56606f; font-size: var(--fs-sm); }
@media (max-width: 640px) {
  .signin-prompt { flex-direction: column; align-items: flex-start; }
}

.priority-panel {
  background: var(--color-navy-950);
  color: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}
.priority-panel::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(232,169,31,0.22), transparent 55%);
  pointer-events: none;
}
.priority-panel__header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); position: relative; z-index: 1; }
.priority-panel__icon { color: var(--color-gold-400); }
.priority-panel h2 { color: var(--color-white); margin-bottom: 0; }
.priority-panel p { color: #c9d6e6; position: relative; z-index: 1; }
.priority-panel .grid { position: relative; z-index: 1; }
.priority-panel .action-tile { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); color: var(--color-white); }
.priority-panel .action-tile__title { color: var(--color-white); }
.priority-panel .action-tile__desc { color: #a9bdd4; }
.priority-panel .action-tile:hover { border-color: var(--color-gold-400); }

/* ===== Login page ===== */
body.login-page { background: var(--color-surface-1); }
.login-shell {
  min-height: calc(100vh - 140px);
  display: grid;
  grid-template-columns: minmax(0, 460px) 1fr;
}
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
}
.login-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--space-8) var(--space-7);
  max-width: 460px;
}
.login-panel__logo { width: 140px; height: auto; margin-bottom: var(--space-5); }
.login-panel__logo--admin { width: 180px; margin-bottom: var(--space-4); }
.login-panel__eyebrow { color: var(--color-gold-700-text); font-weight: 700; font-size: var(--fs-sm); letter-spacing: var(--ls-wide); text-transform: uppercase; margin-bottom: var(--space-2); }
.login-panel h1 { margin-bottom: var(--space-3); }
.login-panel p { color: var(--color-text-muted); }
.login-panel__submit { width: 100%; justify-content: center; margin-top: var(--space-4); }
.announcement-card:empty { display: none !important; }
.login-panel__support { margin-top: var(--space-6); font-size: var(--fs-sm); color: var(--color-text-muted); }
.login-panel__checking { margin-top: var(--space-5); font-size: var(--fs-sm); color: var(--color-text-muted); }
.login-panel__temp-label {
  margin-top: var(--space-6); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--color-text-muted);
}
.login-panel__google-btn { display: flex; align-items: center; gap: var(--space-3); }
.login-panel__google-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--color-gold-500); color: var(--color-navy-900);
  font-weight: 800; font-size: var(--fs-xs); flex-shrink: 0;
}
.login-panel__side {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  display: flex; align-items: flex-end;
  padding: var(--space-7);
}
.login-panel__side::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(106,182,236,0.25), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(232,169,31,0.22), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(255,255,255,0.06), transparent 50%);
}
.login-panel__side-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-panel__mission {
  position: relative; z-index: 1; color: #eef3f9; max-width: 320px;
  font-size: var(--fs-md); line-height: 1.5;
}
@media (max-width: 900px) { .login-panel__side { display: none; } }

.login-footer { margin-top: 0; }

/* ===== Fatal error panel (top-level error boundary) ===== */
#fatal-error-panel {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: var(--color-surface-1);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-5);
}
.fatal-error-panel__card {
  background: var(--color-surface); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-4); padding: var(--space-7); max-width: 440px;
  text-align: center;
}
.fatal-error-panel__card img { margin: 0 auto var(--space-4); }
.fatal-error-panel__card h1 { font-size: var(--fs-xl); }
.fatal-error-panel__support { margin-top: var(--space-5); font-size: var(--fs-sm); color: var(--color-text-muted); }

/* ===== noscript fallback ===== */
.noscript-panel {
  max-width: 560px; margin: var(--space-8) auto; text-align: center;
  padding: var(--space-7); background: var(--color-surface);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-3);
}
.noscript-panel img { margin: 0 auto var(--space-4); }

/* ===== Mission panel (school-community visual element) ===== */
.mission-panel {
  display: flex; align-items: center; gap: var(--space-6);
  padding: var(--space-5) var(--space-6);
  background: var(--color-sky-100);
  border-radius: var(--radius-lg);
  color: var(--color-navy-800);
}
.mission-panel__pathway { width: 200px; height: 30px; flex-shrink: 0; color: var(--color-gold-600); }
.mission-panel__text { margin: 0; font-weight: 600; font-size: var(--fs-md); color: var(--color-navy-800); }
@media (max-width: 768px) {
  .mission-panel { flex-direction: column; text-align: center; gap: var(--space-4); }
  .mission-panel__pathway { width: 160px; }
}

/* ===== Department page category subsections (grouped migrated links) ===== */
.dept-subsection { margin-bottom: var(--space-5); }
.dept-subsection__title { font-size: var(--fs-sm); font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: var(--ls-wide); margin-bottom: var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--color-border); overflow-wrap: anywhere; }
.dept-subsection__count { font-weight: 600; text-transform: none; letter-spacing: normal; }
.category-jump-nav {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  padding: var(--space-4); margin-bottom: var(--space-6);
  background: var(--color-surface-1); border-radius: var(--radius-md);
}
.category-jump-nav a {
  font-size: var(--fs-xs); font-weight: 600; text-decoration: none;
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-full);
  background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-heading);
}
.category-jump-nav a:hover { border-color: var(--color-sky-400); text-decoration: none; }

/* Anchor targets must not land underneath the sticky topbar when jumped
   to -- applies to every category/section anchor on the department page. */
.dept-subsection, [id^="cat-"], #overview-heading, #links-heading, #contacts-heading,
#faq-heading, #digital-tools-section {
  scroll-margin-top: calc(var(--topbar-height) + var(--space-4));
}

/* Section navigation near the hero -- horizontally scrollable on narrow
   viewports instead of wrapping into a tall stack of tiny controls. */
.dept-section-nav {
  display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4);
  overflow: visible; padding-bottom: 0;
}
.dept-section-nav a {
  flex: 0 0 auto; font-size: var(--fs-xs); font-weight: 700; text-decoration: none;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full);
  background: rgba(255,255,255,0.14); color: var(--color-white); white-space: nowrap;
}
.dept-section-nav a:hover { background: rgba(255,255,255,0.26); text-decoration: none; }
@media (max-width: 720px) {
  .dept-section-nav, .category-jump-nav {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-1); scrollbar-width: none; overscroll-behavior-inline: contain;
  }
  .dept-section-nav::-webkit-scrollbar, .category-jump-nav::-webkit-scrollbar { display: none; }
  .dept-section-nav a, .dept-section-nav button, .category-jump-nav a { flex: 0 0 auto; }
}

/* Search-within-department box, shown once a department has enough
   resources for it to matter (see render-department-page.js). */
.dept-search-bar {
  position: relative; margin-bottom: var(--space-2);
}
.dept-search-bar__icon {
  position: absolute; left: var(--space-3); top: 50%; transform: translateY(-50%);
  color: var(--color-text-muted); pointer-events: none;
}
.dept-search-bar input {
  width: 100%; padding: var(--space-3) var(--space-3) var(--space-3) calc(var(--space-3) * 2 + 16px);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  font-size: 16px; background: var(--color-surface);
}
.dept-search-bar input:focus { outline: 2px solid var(--color-sky-400); outline-offset: -1px; }

/* Back-to-top control -- hidden by default (see [hidden] handling in
   base.css), shown via JS once the reader scrolls past the hero. */
.back-to-top-btn {
  position: fixed; right: var(--space-5); bottom: var(--space-5);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-navy-800); color: var(--color-white);
  border: none; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-2); cursor: pointer; z-index: var(--z-topbar);
  transition: background var(--transition-fast);
}
.back-to-top-btn:hover { background: var(--color-navy-900); }
@media (max-width: 640px) {
  .back-to-top-btn { right: var(--space-4); bottom: var(--space-4); }
}

/* ===== Privacy Policy / Terms of Service page ===== */
.legal-doc-tabs {
  display: flex; gap: var(--space-3); margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}
.legal-doc-tabs a {
  padding: var(--space-3) var(--space-1); font-weight: 700; font-size: var(--fs-sm);
  text-decoration: none; color: var(--color-text-muted); border-bottom: 2px solid transparent;
}
.legal-doc-tabs a:hover { color: var(--color-heading); border-bottom-color: var(--color-sky-400); }
.legal-doc { scroll-margin-top: calc(var(--topbar-height) + var(--space-4)); max-width: 760px; }
.legal-doc__meta {
  display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center;
  font-size: var(--fs-sm); color: var(--color-text-muted); margin-bottom: var(--space-5);
}
.legal-doc__body h2 { margin-top: var(--space-6); font-size: var(--fs-lg); }
.legal-doc__body p { margin-bottom: var(--space-3); }
.legal-doc__body ul { margin: 0 0 var(--space-3); padding-left: var(--space-5); }
.legal-doc__body li { margin-bottom: var(--space-2); }
.legal-doc__divider { border: none; border-top: 1px solid var(--color-border); margin: var(--space-8) 0; }

/* ===== Request-type routing panel (Submit a Request page) ===== */
.routing-panel { margin: var(--space-4) 0; padding: var(--space-4); }
.routing-panel__body { display: flex; gap: var(--space-3); align-items: flex-start; }
.routing-panel__icon { color: var(--color-heading); flex: 0 0 auto; margin-top: 2px; }
.routing-panel__actions { display: flex; gap: var(--space-3); margin-top: var(--space-4); flex-wrap: wrap; }
@media (max-width: 480px) {
  .routing-panel__actions { flex-direction: column; }
  .routing-panel__actions .btn { width: 100%; justify-content: center; }
}

/* ===== Welcome modal (one-time homepage dialog, July 2026) =====
   Reuses .card for the surface/border/radius/shadow, existing .btn
   variants for actions, and existing color/spacing/shadow tokens
   throughout -- no new colors or shadows introduced. See
   js/welcome-modal.js for behavior/accessibility. */
.welcome-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 27, 46, 0.5);
  z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-4);
  overflow-y: auto;
  opacity: 0;
  animation: welcome-modal-fade-in var(--transition-base) ease-out forwards;
}
@keyframes welcome-modal-fade-in { to { opacity: 1; } }

.welcome-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: min(600px, 90vh);
  overflow-y: auto;
  padding: var(--space-6) var(--space-5) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-4);
}

.welcome-modal__close-btn {
  position: absolute; top: var(--space-3); right: var(--space-3);
  background: none; border: none; color: var(--color-text-muted);
  padding: var(--space-2); border-radius: var(--radius-sm);
  min-width: 40px; min-height: 40px;
  display: flex; align-items: center; justify-content: center;
}
.welcome-modal__close-btn:hover { background: var(--color-surface-2); color: var(--color-heading); }

.welcome-modal__header {
  display: flex; align-items: center; gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding-right: var(--space-6); /* keep the title clear of the close button */
}
.welcome-modal__logo { border-radius: var(--radius-sm); flex-shrink: 0; }
.welcome-modal__header h2 { font-size: var(--fs-lg); color: var(--color-heading); }

.welcome-modal p { color: var(--color-text); }

.welcome-modal__actions {
  display: flex; gap: var(--space-3); margin-top: var(--space-5); flex-wrap: wrap;
}
.welcome-modal__actions .btn { flex: 1; justify-content: center; min-width: 160px; }
@media (max-width: 480px) {
  .welcome-modal__actions { flex-direction: column; }
  .welcome-modal__actions .btn { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-modal-overlay { animation: none; opacity: 1; }
}

/* ==========================================================================
   Admin feedback system (js/admin-feedback.js) -- shared toasts, banners,
   and confirmation modal replacing alert()/confirm() on admin pages.
   Styled to match the existing .welcome-modal-overlay / .announcement-card
   conventions above rather than introducing a new visual language. */
.admin-toast {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-4);
  font-size: 14px;
  max-width: min(360px, calc(100vw - var(--space-6)));
  display: none;
}
.admin-toast--success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid var(--color-success); }
.admin-toast--info { background: var(--color-info-bg); color: var(--color-navy-900); border: 1px solid var(--color-navy-700); }

.admin-banner {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  font-size: 14px;
  border: 1px solid transparent;
}
.admin-banner--error { background: var(--color-danger-bg); color: var(--color-danger); }
.admin-banner--warning { background: var(--color-warning-bg); color: var(--color-warning); }
.admin-banner--success { background: var(--color-success-bg); color: var(--color-success); }
.admin-banner--info { background: var(--color-info-bg); color: var(--color-navy-900); }
.admin-banner__message { flex: 1; }
.admin-banner__dismiss {
  background: none; border: none; font-size: 18px; line-height: 1; cursor: pointer;
  color: inherit; opacity: 0.7; padding: 0 var(--space-1);
}
.admin-banner__dismiss:hover { opacity: 1; }

.admin-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 27, 46, 0.5);
  z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-4);
}
.admin-modal {
  width: 100%; max-width: 460px; max-height: min(600px, 90vh); overflow-y: auto;
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-4);
}
.admin-modal__body { margin: var(--space-3) 0 var(--space-4); font-size: 14px; color: var(--color-text-muted); }
.admin-modal__actions { display: flex; justify-content: flex-end; gap: var(--space-2); }
@media (max-width: 480px) {
  .admin-modal__actions { flex-direction: column-reverse; }
  .admin-modal__actions .btn { width: 100%; justify-content: center; }
}

/* Quick Preview modal (Edit Department -> Visibility & Publishing tab).
   Deliberately separate from .admin-modal (used by confirmAction's small
   confirm/cancel dialogs) -- this one needs to hold a full department
   preview (hero, contacts, links, FAQs) with its own internal scroll
   region, so it gets its own, larger sizing rather than overloading the
   460px confirm-dialog class. */
.dept-preview-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 27, 46, 0.55);
  z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-4);
}
.dept-preview-modal {
  width: 100%; max-width: 720px; max-height: min(85vh, 780px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-4);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.dept-preview-modal:focus { outline: none; }
.dept-preview-modal__header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.dept-preview-modal__body {
  padding: var(--space-5);
  overflow-y: auto;
  flex: 1;
}
.dept-preview-badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; padding: 2px 10px; border-radius: var(--radius-full);
  background: var(--color-warning-bg); color: var(--color-warning);
}
.dept-preview-hero {
  display: flex; align-items: flex-start; gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .dept-preview-modal { max-height: 100vh; max-width: 100%; border-radius: 0; }
  .dept-preview-modal__header { padding: var(--space-3) var(--space-4); }
  .dept-preview-modal__body { padding: var(--space-4); }
}

/* Admin page title/action rows stay usable on phones and at large text zoom. */
@media (max-width: 640px) {
  .page-section > .flex.items-center.justify-between { align-items: flex-start; flex-wrap: wrap; gap: var(--space-3); }
  .page-section > .flex.items-center.justify-between > .btn { width: 100%; justify-content: center; }
}

/* Unified Edit Department workflow (edit-department.html / edit-department.js) */
.edit-dept-tabs { display: flex; flex-wrap: wrap; gap: var(--space-1); border-bottom: 1px solid var(--color-border); margin-bottom: var(--space-4); }
.edit-dept-tab {
  padding: var(--space-2) var(--space-3);
  border: none; background: none; cursor: pointer;
  font-weight: 600; font-size: 14px; color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
}
.edit-dept-tab[aria-selected="true"] { color: var(--color-heading); border-bottom-color: var(--color-gold-500); }
.edit-dept-tab:focus-visible { outline: 2px solid var(--color-blue-500); outline-offset: 2px; }

.publication-state-banner {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600;
  margin-bottom: var(--space-4);
}
.publication-state-banner--published { background: var(--color-success-bg); color: var(--color-success); }
.publication-state-banner--draft { background: var(--color-warning-bg); color: var(--color-warning); }
.publication-state-banner--unsaved { background: var(--color-danger-bg); color: var(--color-danger); }
.publication-state-banner--archived { background: var(--color-surface-2); color: var(--color-text-muted); }

.content-badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase; padding: 2px 8px; border-radius: var(--radius-sm);
  margin-left: var(--space-2); vertical-align: middle;
}
.content-badge--imported { background: var(--color-surface-2); color: var(--color-text-muted); }
.content-badge--published { background: var(--color-success-bg); color: var(--color-success); }
.content-badge--archived { background: var(--color-danger-bg); color: var(--color-danger); }

/* ===== Search page content alignment =====
   Search Results was sitting flush against the sidebar because it only
   used the shared .container, whose max-width (1500px, see base.css) is
   wider than the space actually available next to the sidebar on most
   desktop screens -- so it never clamped, and content read as "hugging
   the nav" instead of sitting in a comfortable, centered reading column.
   Scoped to the search page only (added alongside .container.page-section
   in search.html, not a change to .container/.page-container themselves)
   so every other page's layout is untouched. Centers the CONTAINER within
   the available area right of the sidebar at a professional max-width;
   text inside stays left-aligned via normal block flow, nothing here
   sets text-align. */
.search-page-container {
  max-width: 1160px;
}

/* =====================================================================
   Dark-mode readability fixes (July 2026 department-content pass)
   ---------------------------------------------------------------------
   The semantic *-bg tokens (--color-info-bg, --color-warning-bg, etc.)
   are intentionally NOT inverted at the token level (tokens.css) because
   several always-light contexts (e.g. .admin-toast--info, which pairs
   them with a fixed dark navy text color) depend on them staying light.
   But a handful of STAFF-FACING components pair those light backgrounds
   with theme-aware text (--color-text / --color-text-muted), which flips
   to light in dark mode -- producing light-on-light. The reported case
   was the Academic Services dashboard announcement card (NAVEX), whose
   .announcement-card background stayed light while its body text went
   light. These narrowly-scoped overrides repoint just those components
   to dark surfaces with light text in dark mode. Light mode is untouched
   (rules live entirely under [data-theme="dark"]), and admin toasts/
   banners and status pills are deliberately left alone -- they read as
   dark-on-light, which still meets AA. ===================================*/
[data-theme="dark"] .announcement-card { background: var(--color-surface-2); border-color: var(--color-border); }
[data-theme="dark"] .announcement-card__icon { color: var(--color-sky-400); }
[data-theme="dark"] .announcement-card--high-priority { background: #33280f; }
[data-theme="dark"] .announcement-card--high-priority .announcement-card__icon { color: var(--color-gold-400); }

/* Status/label badges: as dark, legible tinted pills instead of the
   light-mode light chips (which, on a dark card, read as bright islands).
   Scoped to .badge--* only -- .status-*, .admin-*, .content-badge--*,
   .btn--danger and .error-state keep their existing treatment. */
[data-theme="dark"] .badge--info { background: rgba(47, 143, 217, 0.18); color: var(--color-sky-400); }
[data-theme="dark"] .badge--warning { background: rgba(232, 169, 31, 0.18); color: var(--color-gold-400); }
[data-theme="dark"] .badge--success { background: rgba(21, 122, 83, 0.24); color: #6bd6a8; }
[data-theme="dark"] .badge--danger { background: rgba(174, 42, 34, 0.26); color: #f0a099; }

/* New department-page anchors added this pass must also clear the sticky
   topbar when jumped to (matches the existing scroll-margin rule set).
   #departments and #announcements-section (homepage sections targeted by
   the mobile nav drawer's "Departments" link) are included here too --
   same defect class, same fix. */
#when-to-contact-heading, #as-when-to-contact-heading, #as-faq-heading,
#departments, #announcements-section {
  scroll-margin-top: calc(var(--topbar-height) + var(--space-4));
}

/* Human Resources section selector: same visual language as the existing
   hero chips, but implemented as real tabs so selecting a section reveals
   content in place instead of jumping farther down a long document list. */
.dept-section-nav--tabs button {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid rgba(255,255,255,0.22);
  cursor: pointer;
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.14);
  color: var(--color-white);
  white-space: nowrap;
}
.dept-section-nav--tabs button:hover,
.dept-section-nav--tabs button.is-active {
  background: rgba(255,255,255,0.30);
  border-color: rgba(255,255,255,0.55);
}
.dept-section-nav--tabs button:focus-visible {
  outline: 2px solid var(--color-gold-400);
  outline-offset: 2px;
}

/* ===== Staff portal lock screen =====
   Scoped to .staff-lock-page so the rest of the portal is unchanged. */
body.staff-lock-page {
  color-scheme: light;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: #071a2f;
  color: #172033;
}

body.staff-lock-page .staff-lock-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: clamp(440px, 34vw, 570px) minmax(0, 1fr);
  background: #f7f9fc;
}

body.staff-lock-page .staff-lock-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding:
    max(2.25rem, env(safe-area-inset-top))
    clamp(2.4rem, 4vw, 4.7rem)
    max(2rem, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 8% 4%, rgba(232,169,31,0.055), transparent 18rem),
    #f9fbfd;
  box-shadow: 16px 0 48px rgba(4, 18, 33, 0.10);
}

body.staff-lock-page .staff-lock-header {
  width: 100%;
  max-width: 430px;
}

body.staff-lock-page .staff-lock-logo {
  display: block;
  width: min(100%, 360px);
  height: auto;
  margin: 0 0 clamp(2.2rem, 4.7vh, 3.25rem);
}

body.staff-lock-page .staff-lock-card h1 {
  margin: 0 0 1rem;
  color: #0f2540;
  font-size: clamp(2.65rem, 4.35vw, 4.05rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

body.staff-lock-page .staff-lock-intro {
  margin: 0;
  color: #637083;
  font-size: clamp(0.96rem, 1.2vw, 1.08rem);
  line-height: 1.65;
}

body.staff-lock-page .staff-lock-form {
  width: 100%;
  max-width: 430px;
  margin-top: clamp(1.75rem, 3.4vh, 2.35rem);
}

body.staff-lock-page .staff-lock-field {
  margin: 0;
}

body.staff-lock-page .staff-lock-field label {
  display: block;
  margin-bottom: 0.7rem;
  color: #0f2540;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

body.staff-lock-page .staff-lock-input-wrap {
  position: relative;
}

body.staff-lock-page .staff-lock-input-icon {
  position: absolute;
  left: 1.05rem;
  top: 50%;
  width: 21px;
  height: 21px;
  transform: translateY(-50%);
  fill: none;
  stroke: #8795a8;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

body.staff-lock-page .staff-lock-input-wrap > input {
  display: block;
  width: 100%;
  min-height: 58px;
  padding: 0.9rem 3.25rem 0.9rem 3.1rem;
  border: 1px solid #bdc8d5;
  border-radius: 13px;
  outline: none;
  background: #ffffff;
  color: #172033;
  font: inherit;
  font-size: 1rem;
  box-shadow: 0 1px 2px rgba(15,37,64,0.02), inset 0 1px 1px rgba(15,37,64,0.02);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

body.staff-lock-page .staff-lock-input-wrap > input::placeholder {
  color: #93a0b0;
  opacity: 1;
}

body.staff-lock-page .staff-lock-input-wrap > input:hover {
  border-color: #9eacbd;
}

body.staff-lock-page .staff-lock-input-wrap > input:focus,
body.staff-lock-page .staff-lock-input-wrap > input:focus-visible {
  border-color: #2f8fd9;
  box-shadow: 0 0 0 4px rgba(47,143,217,0.14);
}

body.staff-lock-page .staff-lock-input-wrap > input[aria-invalid="true"] {
  border-color: #ae2a22;
  box-shadow: 0 0 0 4px rgba(174,42,34,0.10);
}

body.staff-lock-page .staff-lock-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.72rem;
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  transform: translateY(-50%);
  background: transparent;
  color: #7e8da0;
  cursor: pointer;
}

body.staff-lock-page .staff-lock-password-toggle:hover {
  background: #f0f4f8;
  color: #3f566f;
}

body.staff-lock-page .staff-lock-password-toggle:focus-visible {
  outline: 3px solid rgba(47,143,217,0.22);
  outline-offset: 1px;
}

body.staff-lock-page .staff-lock-password-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.staff-lock-page .staff-lock-primary {
  width: 100%;
  min-height: 58px;
  margin-top: 1.25rem;
  padding: 0.95rem 1.25rem;
  border: 1px solid #0f2540;
  border-radius: 13px;
  background: linear-gradient(135deg, #0f2540 0%, #14365c 100%);
  color: #ffffff;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 8px 20px rgba(15,37,64,0.18);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

body.staff-lock-page .staff-lock-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #14365c 0%, #1b497a 100%);
  box-shadow: 0 10px 24px rgba(15,37,64,0.22);
  transform: translateY(-1px);
}

body.staff-lock-page .staff-lock-primary:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(232,169,31,0.30), 0 8px 20px rgba(15,37,64,0.18);
}

body.staff-lock-page .staff-lock-primary:disabled {
  cursor: wait;
  opacity: 0.76;
  transform: none;
}

body.staff-lock-page .staff-lock-error,
body.staff-lock-page .staff-lock-notice {
  width: 100%;
  max-width: 430px;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 11px;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.45;
}

body.staff-lock-page .staff-lock-error {
  border: 1px solid rgba(174,42,34,0.18);
  background: #fbe9e7;
  color: #8d211b;
}

body.staff-lock-page .staff-lock-notice {
  margin: 0 0 1.2rem;
  border: 1px solid rgba(29,95,150,0.16);
  background: #e8f3fc;
  color: #174b78;
}

body.staff-lock-page .staff-lock-separator {
  display: grid;
  width: 100%;
  max-width: 430px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.9rem;
  margin: clamp(1.6rem, 3.2vh, 2rem) 0 1.05rem;
  color: #58687c;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

body.staff-lock-page .staff-lock-separator::before,
body.staff-lock-page .staff-lock-separator::after {
  content: "";
  height: 1px;
  background: #cfd8e2;
}

body.staff-lock-page .staff-lock-google {
  width: 100%;
  max-width: 430px;
  margin-top: 0.15rem;
}

/* Google is the primary action. The password form follows the divider
   directly, without the old form-top gap that made the fallback look detached. */
body.staff-lock-page #staff-password-block .staff-lock-form {
  margin-top: 0;
}

body.staff-lock-page .staff-lock-google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  width: 100%;
  min-height: 58px;
  padding: 0.9rem 1rem;
  border: 1px solid #dce3eb;
  border-radius: 13px;
  background: #ffffff;
  color: #20344d;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  opacity: 1;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(15,37,64,0.05);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease, transform 150ms ease;
}

body.staff-lock-page .staff-lock-google-button:hover:not(:disabled) {
  border-color: #b8c6d5;
  background: #fbfcfe;
  box-shadow: 0 6px 16px rgba(15,37,64,0.08);
  transform: translateY(-1px);
}

body.staff-lock-page .staff-lock-google-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(47,143,217,0.14), 0 3px 12px rgba(15,37,64,0.05);
}

body.staff-lock-page .staff-lock-google-button:disabled {
  color: #a7b0bd;
  cursor: not-allowed;
  transform: none;
}

body.staff-lock-page .staff-lock-google-button[aria-busy="true"],
body.staff-lock-page .staff-lock-primary[aria-busy="true"] {
  cursor: wait;
}

body.staff-lock-page .staff-lock-google-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

body.staff-lock-page .staff-lock-footer {
  width: 100%;
  max-width: 430px;
  margin-top: clamp(1.75rem, 3.8vh, 2.65rem);
  text-align: center;
  font-size: 0.85rem;
}

body.staff-lock-page .staff-lock-footer a {
  color: #1f6fb2;
  font-weight: 600;
  text-underline-offset: 3px;
}

body.staff-lock-page .staff-lock-visual {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: #071f38;
}

body.staff-lock-page .staff-lock-brand-picture {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: none;
}

body.staff-lock-page .staff-lock-brand-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

/* On desktop, show the complete supplied lock-screen artwork instead of
   enlarging/cropping it to fill the wide visual column. This keeps the
   artwork substantially smaller while the surrounding navy blends into it. */
@media (min-width: 901px) {
  body.staff-lock-page .staff-lock-brand-art {
    object-fit: contain;
  }
}

body.staff-lock-page .staff-lock-visual {
  display: block;
  padding: 0;
  background: #071f38;
}

/* The supplied Highlands workspace artwork is the complete visual.
   Do not layer extra gradients or duplicate text/logo over it. */
body.staff-lock-page .staff-lock-visual::before,
body.staff-lock-page .staff-lock-visual::after {
  display: none;
}

body.staff-lock-page .staff-lock-visual-content {
  position: relative;
  z-index: 2;
  width: min(100%, 720px);
  text-align: center;
  color: #ffffff;
}

body.staff-lock-page .staff-lock-visual-icon {
  display: block;
  width: clamp(88px, 9vw, 130px);
  height: auto;
  margin: 0 auto clamp(1.4rem, 3vh, 2rem);
  filter: drop-shadow(0 12px 28px rgba(0,0,0,0.18));
}

body.staff-lock-page .staff-lock-visual-eyebrow {
  margin-bottom: 0.8rem;
  color: #f4b517;
  font-size: clamp(0.72rem, 0.9vw, 0.86rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

body.staff-lock-page .staff-lock-visual-content h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.2rem, 4.3vw, 4.6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-shadow: 0 8px 28px rgba(0,0,0,0.18);
}

body.staff-lock-page .staff-lock-visual-content p {
  max-width: 610px;
  margin: 1.25rem auto 0;
  color: rgba(255,255,255,0.78);
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.65;
}

body.staff-lock-page .staff-lock-visual-rule {
  width: 74px;
  height: 3px;
  margin: 1.8rem auto 1rem;
  border-radius: 999px;
  background: #f4b517;
}

body.staff-lock-page .staff-lock-visual-school {
  color: rgba(255,255,255,0.62);
  font-size: clamp(0.74rem, 0.92vw, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.035em;
}

body.staff-lock-page .noscript-panel {
  color: #172033;
  background: #ffffff;
}

body.staff-lock-page .noscript-panel h1 {
  color: #0f2540;
}

body.staff-lock-page .noscript-panel p {
  color: #637083;
}

@media (max-height: 760px) and (min-width: 901px) {
  body.staff-lock-page .staff-lock-card {
    justify-content: flex-start;
    overflow-y: auto;
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
  }

  body.staff-lock-page .staff-lock-logo {
    width: min(100%, 300px);
    margin-bottom: 1.6rem;
  }

  body.staff-lock-page .staff-lock-card h1 {
    font-size: 2.8rem;
  }

  body.staff-lock-page .staff-lock-form {
    margin-top: 1.35rem;
  }

  body.staff-lock-page .staff-lock-separator {
    margin-top: 1.4rem;
  }

  body.staff-lock-page .staff-lock-footer {
    margin-top: 1.6rem;
  }
}

@media (max-width: 900px) {
  body.staff-lock-page {
    background: #f7f9fc;
  }

  body.staff-lock-page .staff-lock-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    background: #f7f9fc;
  }

  body.staff-lock-page .staff-lock-visual {
    order: -1;
    min-height: clamp(230px, 40vw, 320px);
    height: clamp(230px, 40vw, 320px);
    padding: 0;
  }

  body.staff-lock-page .staff-lock-brand-art {
    object-position: center 51%;
  }

  body.staff-lock-page .staff-lock-card {
    width: 100%;
    padding:
      clamp(2rem, 6vw, 3rem)
      max(1.4rem, env(safe-area-inset-right))
      max(2rem, env(safe-area-inset-bottom))
      max(1.4rem, env(safe-area-inset-left));
    box-shadow: none;
  }

  body.staff-lock-page .staff-lock-header,
  body.staff-lock-page .staff-lock-form,
  body.staff-lock-page .staff-lock-error,
  body.staff-lock-page .staff-lock-notice,
  body.staff-lock-page .staff-lock-separator,
  body.staff-lock-page .staff-lock-google,
  body.staff-lock-page .staff-lock-footer {
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
  }

  body.staff-lock-page .staff-lock-logo {
    width: min(100%, 350px);
    margin: 0 auto 2rem;
  }

  body.staff-lock-page .staff-lock-card h1 {
    font-size: clamp(2.55rem, 9vw, 3.5rem);
  }
}

@media (max-width: 560px) {
  body.staff-lock-page .staff-lock-visual-content {
    width: min(100%, 520px);
  }

  body.staff-lock-page .staff-lock-visual-icon {
    width: 62px;
    margin-bottom: 0.7rem;
  }

  body.staff-lock-page .staff-lock-visual-eyebrow {
    display: none;
  }

  body.staff-lock-page .staff-lock-visual-content h2 {
    font-size: clamp(1.55rem, 7.4vw, 2.15rem);
  }

  body.staff-lock-page .staff-lock-visual-content p {
    margin-top: 0.55rem;
    font-size: 0.83rem;
    line-height: 1.45;
  }

  body.staff-lock-page .staff-lock-visual-rule,
  body.staff-lock-page .staff-lock-visual-school {
    display: none;
  }

  body.staff-lock-page .staff-lock-visual {
    min-height: clamp(245px, 63vw, 315px);
    height: clamp(245px, 63vw, 315px);
    padding: 0;
  }

  body.staff-lock-page .staff-lock-brand-art {
    object-position: center 51%;
  }

  body.staff-lock-page .staff-lock-card {
    padding-top: 1.75rem;
  }

  body.staff-lock-page .staff-lock-logo {
    width: min(100%, 310px);
    margin-bottom: 1.7rem;
  }

  body.staff-lock-page .staff-lock-card h1 {
    font-size: clamp(2.35rem, 12vw, 3rem);
  }

  body.staff-lock-page .staff-lock-intro {
    font-size: 0.97rem;
  }

  body.staff-lock-page .staff-lock-form {
    margin-top: 1.55rem;
  }

  body.staff-lock-page .staff-lock-input-wrap > input,
  body.staff-lock-page .staff-lock-primary,
  body.staff-lock-page .staff-lock-google-button,
  body.staff-lock-page .staff-lock-google-button:disabled {
    min-height: 56px;
  }

  body.staff-lock-page .staff-lock-separator {
    gap: 0.7rem;
    margin-top: 1.65rem;
    font-size: 0.78rem;
  }

  body.staff-lock-page .staff-lock-footer {
    margin-top: 2.25rem;
  }
}

@media (max-width: 380px) {
  body.staff-lock-page .staff-lock-card {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  body.staff-lock-page .staff-lock-logo {
    width: min(100%, 280px);
  }

  body.staff-lock-page .staff-lock-card h1 {
    font-size: 2.3rem;
  }

  body.staff-lock-page .staff-lock-separator span {
    white-space: normal;
    text-align: center;
  }
}

/* ===== Premium staff lock-screen refinement — 2026-09-01 =====
   Purpose: keep the supplied artwork at a controlled size on desktop,
   remove the empty "navy gutter" look, and give phones a purpose-built
   premium composition instead of simply shrinking the desktop layout. */
@media (min-width: 901px) {
  body.staff-lock-page .staff-lock-shell {
    grid-template-columns: clamp(420px, 29vw, 520px) minmax(0, 1fr);
    background: #061a31;
  }

  body.staff-lock-page .staff-lock-card {
    padding-left: clamp(2.4rem, 3.8vw, 4.25rem);
    padding-right: clamp(2.4rem, 3.8vw, 4.25rem);
    background:
      radial-gradient(circle at 12% 8%, rgba(244,181,23,0.07), transparent 18rem),
      linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 22px 0 70px rgba(1, 14, 28, 0.18);
  }

  body.staff-lock-page .staff-lock-logo {
    width: min(100%, 325px);
    margin-bottom: clamp(2rem, 3.8vh, 2.8rem);
  }

  body.staff-lock-page .staff-lock-card h1 {
    font-size: clamp(2.7rem, 3.45vw, 3.65rem);
  }

  body.staff-lock-page .staff-lock-visual {
    display: grid;
    place-items: center;
    padding: clamp(1.35rem, 3vh, 2.4rem) clamp(1.5rem, 3vw, 3rem);
    background:
      radial-gradient(circle at 58% 14%, rgba(72, 158, 235, 0.22), transparent 33%),
      radial-gradient(circle at 84% 72%, rgba(0, 115, 207, 0.16), transparent 32%),
      #061a31;
  }

  body.staff-lock-page .staff-lock-visual::before {
    content: "";
    position: absolute;
    inset: -36px;
    z-index: -2;
    display: block;
    background:
      linear-gradient(rgba(2, 20, 39, 0.44), rgba(2, 20, 39, 0.56)),
      url("../assets/branding/staff-digital-workspace-lockscreen-premium-2026-09-01.webp") center / cover no-repeat;
    filter: blur(18px) saturate(0.9);
    transform: scale(1.07);
    opacity: 0.72;
  }

  body.staff-lock-page .staff-lock-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    display: block;
    background:
      linear-gradient(90deg, rgba(2,18,35,0.55) 0%, rgba(2,18,35,0.08) 18%, rgba(2,18,35,0.08) 82%, rgba(2,18,35,0.46) 100%),
      linear-gradient(180deg, rgba(2,18,35,0.18), rgba(2,18,35,0.38));
    pointer-events: none;
  }

  body.staff-lock-page .staff-lock-brand-picture {
    position: relative;
    inset: auto;
    z-index: 1;
    width: auto;
    height: min(88dvh, 860px);
    max-width: min(92%, 980px);
    aspect-ratio: 1349 / 1166;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: clamp(18px, 1.6vw, 26px);
    background: #08223e;
    box-shadow:
      0 30px 90px rgba(0,0,0,0.34),
      0 2px 0 rgba(255,255,255,0.08) inset;
  }

  body.staff-lock-page .staff-lock-brand-art {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }
}

/* Tablet and phone composition. The visual becomes a cinematic brand
   masthead and the access panel floats over it like a native app sheet. */
@media (max-width: 900px) {
  body.staff-lock-page {
    min-height: 100dvh;
    background:
      radial-gradient(circle at 50% -10%, rgba(39,134,211,0.38), transparent 36%),
      #061a31;
  }

  body.staff-lock-page .staff-lock-shell {
    display: flex;
    min-height: 100dvh;
    background: transparent;
  }

  body.staff-lock-page .staff-lock-visual {
    position: relative;
    z-index: 0;
    order: -1;
    width: 100%;
    height: clamp(210px, 35vh, 300px);
    min-height: clamp(210px, 35vh, 300px);
    overflow: hidden;
    padding: 0;
    background: #061d37;
  }

  body.staff-lock-page .staff-lock-visual::before {
    content: "";
    position: absolute;
    inset: -12px;
    z-index: 0;
    display: block;
    background: url("../assets/branding/staff-digital-workspace-lockscreen-premium-2026-09-01.webp") center 18% / cover no-repeat;
    filter: blur(8px) saturate(0.9);
    transform: scale(1.05);
    opacity: 0.62;
  }

  body.staff-lock-page .staff-lock-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    background:
      linear-gradient(180deg, rgba(3,20,38,0.06) 0%, rgba(3,20,38,0.10) 48%, rgba(3,20,38,0.72) 100%),
      linear-gradient(90deg, rgba(3,20,38,0.18), transparent 30%, transparent 70%, rgba(3,20,38,0.18));
    pointer-events: none;
  }

  body.staff-lock-page .staff-lock-brand-picture {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    opacity: 1;
  }

  body.staff-lock-page .staff-lock-brand-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
  }

  body.staff-lock-page .staff-lock-card {
    position: relative;
    z-index: 3;
    width: calc(100% - 20px);
    max-width: 720px;
    min-height: calc(100dvh - 230px);
    margin: -26px auto 0;
    padding:
      clamp(1.65rem, 5vw, 2.4rem)
      max(1.35rem, calc(env(safe-area-inset-right) + 0.8rem))
      max(2rem, calc(env(safe-area-inset-bottom) + 1.2rem))
      max(1.35rem, calc(env(safe-area-inset-left) + 0.8rem));
    border: 1px solid rgba(255,255,255,0.72);
    border-bottom: 0;
    border-radius: 28px 28px 0 0;
    background:
      radial-gradient(circle at 92% 0%, rgba(33,132,207,0.055), transparent 18rem),
      linear-gradient(180deg, rgba(255,255,255,0.985), rgba(248,250,253,0.995));
    box-shadow:
      0 -20px 55px rgba(0,0,0,0.20),
      0 1px 0 rgba(255,255,255,0.92) inset;
  }

  body.staff-lock-page .staff-lock-header,
  body.staff-lock-page .staff-lock-google,
  body.staff-lock-page .staff-lock-separator,
  body.staff-lock-page .staff-lock-form,
  body.staff-lock-page .staff-lock-error,
  body.staff-lock-page .staff-lock-notice,
  body.staff-lock-page .staff-lock-footer {
    width: 100%;
    max-width: 470px;
  }

  body.staff-lock-page .staff-lock-header {
    text-align: center;
  }

  body.staff-lock-page .staff-lock-logo {
    width: min(72%, 260px);
    margin: 0 auto 1.35rem;
  }

  body.staff-lock-page .staff-lock-card h1 {
    margin-bottom: 0.8rem;
    font-size: clamp(2.3rem, 8vw, 3.15rem);
    line-height: 1.02;
  }

  body.staff-lock-page .staff-lock-intro {
    max-width: 390px;
    margin-inline: auto;
    color: #637083;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  body.staff-lock-page .staff-lock-google-button,
  body.staff-lock-page .staff-lock-input-wrap > input,
  body.staff-lock-page .staff-lock-primary {
    border-radius: 14px;
  }

  body.staff-lock-page .staff-lock-google-button {
    border-color: #d8e2ec;
    box-shadow: 0 8px 24px rgba(15,37,64,0.07);
  }

  body.staff-lock-page .staff-lock-primary {
    box-shadow: 0 12px 28px rgba(15,37,64,0.20);
  }

  body.staff-lock-page .staff-lock-footer {
    padding-bottom: 0.4rem;
  }
}

@media (max-width: 560px) {
  body.staff-lock-page .staff-lock-visual {
    height: 220px;
    min-height: 220px;
  }

  body.staff-lock-page .staff-lock-card {
    width: calc(100% - 14px);
    min-height: calc(100dvh - 194px);
    margin-top: -26px;
    padding-top: 1.45rem;
    padding-left: max(1.15rem, calc(env(safe-area-inset-left) + 0.65rem));
    padding-right: max(1.15rem, calc(env(safe-area-inset-right) + 0.65rem));
    border-radius: 26px 26px 0 0;
  }

  body.staff-lock-page .staff-lock-logo {
    width: min(68%, 215px);
    margin-bottom: 1.05rem;
  }

  body.staff-lock-page .staff-lock-card h1 {
    font-size: clamp(2rem, 9.5vw, 2.55rem);
    letter-spacing: -0.05em;
  }


  body.staff-lock-page .staff-lock-intro {
    font-size: 0.92rem;
  }

  body.staff-lock-page .staff-lock-google {
    margin-top: 0.9rem;
  }

  body.staff-lock-page .staff-lock-google-button,
  body.staff-lock-page .staff-lock-input-wrap > input,
  body.staff-lock-page .staff-lock-primary {
    min-height: 54px;
  }

  body.staff-lock-page .staff-lock-separator {
    margin-top: 1.35rem;
    margin-bottom: 0.9rem;
    gap: 0.55rem;
    font-size: 0.74rem;
  }

  body.staff-lock-page .staff-lock-field label {
    margin-bottom: 0.55rem;
    font-size: 0.88rem;
  }

  body.staff-lock-page .staff-lock-primary {
    margin-top: 1rem;
  }

  body.staff-lock-page .staff-lock-footer {
    margin-top: 1.65rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 380px) {
  body.staff-lock-page .staff-lock-visual {
    height: 196px;
    min-height: 196px;
  }

  body.staff-lock-page .staff-lock-card {
    width: calc(100% - 10px);
    min-height: calc(100dvh - 170px);
    padding-left: max(1rem, calc(env(safe-area-inset-left) + 0.5rem));
    padding-right: max(1rem, calc(env(safe-area-inset-right) + 0.5rem));
  }

  body.staff-lock-page .staff-lock-logo {
    width: min(70%, 190px);
  }

  body.staff-lock-page .staff-lock-card h1 {
    font-size: 2rem;
  }
}


/* ===== Mobile lock-screen overlap fix — 2026-09-01 =====
   Tightens the mobile vertical rhythm, reduces the card/banner collision,
   and keeps the first screen feeling premium without content stacking into
   the browser chrome. */
@media (max-width: 900px) {
  body.staff-lock-page .staff-lock-shell {
    flex-direction: column;
    align-items: stretch;
  }

  body.staff-lock-page .staff-lock-visual {
    height: clamp(180px, 30vh, 250px);
    min-height: clamp(180px, 30vh, 250px);
  }

  body.staff-lock-page .staff-lock-visual::before {
    background-position: center 12%;
  }

  body.staff-lock-page .staff-lock-brand-art {
    object-position: center 12%;
  }

  body.staff-lock-page .staff-lock-card {
    width: calc(100% - 18px);
    min-height: auto;
    margin: -14px auto 0;
    padding-top: 1.35rem;
    padding-bottom: max(1.5rem, calc(env(safe-area-inset-bottom) + 1rem));
    border-radius: 24px 24px 0 0;
  }

  body.staff-lock-page .staff-lock-header,
  body.staff-lock-page .staff-lock-google,
  body.staff-lock-page .staff-lock-separator,
  body.staff-lock-page .staff-lock-form,
  body.staff-lock-page .staff-lock-error,
  body.staff-lock-page .staff-lock-notice,
  body.staff-lock-page .staff-lock-footer {
    max-width: 430px;
    margin-left: auto;
    margin-right: auto;
  }

  body.staff-lock-page .staff-lock-logo {
    width: min(60%, 190px);
    margin-bottom: 0.9rem;
  }

  body.staff-lock-page .staff-lock-card h1 {
    margin-bottom: 0.6rem;
    font-size: clamp(1.95rem, 8.2vw, 2.55rem);
    line-height: 1.02;
  }

  body.staff-lock-page .staff-lock-intro {
    max-width: 360px;
    font-size: 0.9rem;
    line-height: 1.45;
  }

  body.staff-lock-page .staff-lock-google {
    margin-top: 0.75rem;
  }

  body.staff-lock-page .staff-lock-form {
    margin-top: 1.1rem;
  }

  body.staff-lock-page .staff-lock-google-button,
  body.staff-lock-page .staff-lock-input-wrap > input,
  body.staff-lock-page .staff-lock-primary {
    min-height: 52px;
  }

  body.staff-lock-page .staff-lock-separator {
    margin: 1.1rem auto 0.8rem;
    gap: 0.5rem;
    font-size: 0.72rem;
  }

  body.staff-lock-page .staff-lock-field label {
    margin-bottom: 0.5rem;
    font-size: 0.86rem;
  }

  body.staff-lock-page .staff-lock-error,
  body.staff-lock-page .staff-lock-notice {
    margin-top: 0.85rem;
    padding: 0.78rem 0.9rem;
    font-size: 0.84rem;
  }

  body.staff-lock-page .staff-lock-primary {
    margin-top: 0.95rem;
  }

  body.staff-lock-page .staff-lock-footer {
    margin-top: 1.2rem;
    padding-bottom: 0.15rem;
    font-size: 0.79rem;
  }
}

@media (max-width: 430px) {
  body.staff-lock-page .staff-lock-visual {
    height: 184px;
    min-height: 184px;
  }

  body.staff-lock-page .staff-lock-card {
    width: calc(100% - 12px);
    margin-top: -12px;
    padding-left: max(1rem, calc(env(safe-area-inset-left) + 0.5rem));
    padding-right: max(1rem, calc(env(safe-area-inset-right) + 0.5rem));
  }

  body.staff-lock-page .staff-lock-logo {
    width: min(56%, 172px);
  }

  body.staff-lock-page .staff-lock-card h1 {
    font-size: clamp(1.82rem, 9vw, 2.2rem);
  }

  body.staff-lock-page .staff-lock-intro {
    font-size: 0.88rem;
  }
}


/* ===== Premium mobile lock-screen pass 2 — 2026-09-01 =====
   Removes the remaining card/banner collision on phones and creates a
   cleaner app-like hierarchy. Desktop rules above remain untouched. */
@media (max-width: 900px) {
  body.staff-lock-page {
    background: #eef3f8;
  }

  body.staff-lock-page .staff-lock-shell {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #eef3f8;
  }

  body.staff-lock-page .staff-lock-visual {
    flex: 0 0 auto;
    height: clamp(190px, 27vh, 235px);
    min-height: clamp(190px, 27vh, 235px);
    border-radius: 0 0 26px 26px;
    background: #061d37 url("../assets/branding/staff-digital-workspace-lockscreen-premium-2026-09-01.webp") center 14% / cover no-repeat;
    box-shadow: 0 14px 34px rgba(3, 20, 38, 0.18);
  }

  body.staff-lock-page .staff-lock-brand-art {
    object-position: center 14%;
  }

  body.staff-lock-page .staff-lock-card {
    width: min(calc(100% - 24px), 680px);
    min-height: auto;
    margin: 12px auto max(12px, env(safe-area-inset-bottom));
    padding:
      1.45rem
      max(1.3rem, calc(env(safe-area-inset-right) + 0.75rem))
      1.3rem
      max(1.3rem, calc(env(safe-area-inset-left) + 0.75rem));
    border: 1px solid rgba(15, 37, 64, 0.07);
    border-radius: 24px;
    background:
      radial-gradient(circle at 94% 2%, rgba(244,181,23,0.065), transparent 11rem),
      linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    box-shadow:
      0 18px 48px rgba(15, 37, 64, 0.12),
      0 1px 0 rgba(255,255,255,0.92) inset;
  }

  body.staff-lock-page .staff-lock-header {
    text-align: center;
  }

  body.staff-lock-page .staff-lock-header::before {
    content: "SECURE STAFF ACCESS";
    display: block;
    margin: 0 0 0.55rem;
    color: #b98000;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.16em;
  }

  body.staff-lock-page .staff-lock-logo {
    display: none;
  }

  body.staff-lock-page .staff-lock-card h1 {
    margin: 0 0 0.55rem;
    font-size: clamp(1.9rem, 6.5vw, 2.4rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
  }

  body.staff-lock-page .staff-lock-card h1 br {
    display: none;
  }

  body.staff-lock-page .staff-lock-intro {
    max-width: 380px;
    margin-inline: auto;
    font-size: 0.88rem;
    line-height: 1.45;
  }

  body.staff-lock-page .staff-lock-google {
    margin-top: 1rem;
  }

  body.staff-lock-page .staff-lock-google-button,
  body.staff-lock-page .staff-lock-input-wrap > input,
  body.staff-lock-page .staff-lock-primary {
    min-height: 52px;
    border-radius: 14px;
  }

  body.staff-lock-page .staff-lock-google-button {
    box-shadow: 0 7px 18px rgba(15,37,64,0.07);
  }

  body.staff-lock-page .staff-lock-separator {
    margin: 1.05rem auto 0.8rem;
  }

  body.staff-lock-page .staff-lock-form {
    margin-top: 0;
  }

  body.staff-lock-page .staff-lock-primary {
    margin-top: 0.9rem;
  }

  body.staff-lock-page .staff-lock-footer {
    margin-top: 1.1rem;
  }
}

@media (max-width: 560px) {
  body.staff-lock-page .staff-lock-brand-picture {
    display: none;
  }

  body.staff-lock-page .staff-lock-visual {
    height: 170px;
    min-height: 170px;
    border-radius: 0 0 22px 22px;
  }

  body.staff-lock-page .staff-lock-visual::before {
    background-position: center top;
  }

  body.staff-lock-page .staff-lock-visual {
    background-size: 112% auto;
    background-position: center top;
  }

  body.staff-lock-page .staff-lock-brand-art {
    object-position: center top;
  }

  body.staff-lock-page .staff-lock-card {
    width: calc(100% - 20px);
    margin-top: 10px;
    padding-top: 1.2rem;
    padding-bottom: 1.15rem;
    border-radius: 22px;
  }

  body.staff-lock-page .staff-lock-header::before {
    margin-bottom: 0.48rem;
    font-size: 0.64rem;
  }

  body.staff-lock-page .staff-lock-card h1 {
    font-size: clamp(1.72rem, 7.8vw, 2rem);
    white-space: normal;
  }

  body.staff-lock-page .staff-lock-intro {
    font-size: 0.84rem;
    line-height: 1.4;
  }

  body.staff-lock-page .staff-lock-google {
    margin-top: 0.85rem;
  }

  body.staff-lock-page .staff-lock-google-button,
  body.staff-lock-page .staff-lock-input-wrap > input,
  body.staff-lock-page .staff-lock-primary {
    min-height: 50px;
  }

  body.staff-lock-page .staff-lock-separator {
    margin-top: 0.95rem;
    margin-bottom: 0.7rem;
    font-size: 0.7rem;
  }

  body.staff-lock-page .staff-lock-field label {
    margin-bottom: 0.45rem;
    font-size: 0.84rem;
  }

  body.staff-lock-page .staff-lock-footer {
    margin-top: 0.95rem;
    font-size: 0.76rem;
  }
}

@media (max-width: 390px) {
  body.staff-lock-page .staff-lock-visual {
    height: 156px;
    min-height: 156px;
  }

  body.staff-lock-page .staff-lock-card {
    width: calc(100% - 16px);
    margin-top: 8px;
    padding-left: max(0.95rem, calc(env(safe-area-inset-left) + 0.45rem));
    padding-right: max(0.95rem, calc(env(safe-area-inset-right) + 0.45rem));
  }

  body.staff-lock-page .staff-lock-card h1 {
    font-size: 1.72rem;
  }

  body.staff-lock-page .staff-lock-intro {
    font-size: 0.82rem;
  }
}

/* ===== Premium mobile lock-screen pass 3 — unified full-screen composition ===== */
body.staff-lock-page .staff-lock-mobile-mark {
  display: none;
}

@media (max-width: 900px) {
  body.staff-lock-page {
    min-height: 100dvh;
    background:
      linear-gradient(180deg, rgba(3,20,38,0.60) 0%, rgba(3,20,38,0.82) 45%, rgba(3,20,38,0.94) 100%),
      url("../assets/branding/staff-digital-workspace-lockscreen-premium-2026-09-01.webp") center top / cover no-repeat fixed;
  }

  body.staff-lock-page .staff-lock-shell {
    position: relative;
    display: block;
    min-height: 100dvh;
    padding:
      max(1.1rem, env(safe-area-inset-top))
      max(0.85rem, env(safe-area-inset-right))
      max(1.1rem, env(safe-area-inset-bottom))
      max(0.85rem, env(safe-area-inset-left));
    background:
      radial-gradient(circle at 50% 0%, rgba(43,137,210,0.18), transparent 34%),
      linear-gradient(180deg, rgba(4,23,42,0.10), rgba(4,23,42,0.34));
  }

  body.staff-lock-page .staff-lock-visual {
    display: none !important;
  }

  body.staff-lock-page .staff-lock-card {
    width: min(100%, 520px);
    min-height: auto;
    margin: clamp(0.8rem, 4vh, 2.25rem) auto 0;
    padding:
      clamp(1.35rem, 4vw, 1.75rem)
      clamp(1.1rem, 4.5vw, 1.65rem)
      clamp(1.2rem, 4vw, 1.55rem);
    border: 1px solid rgba(255,255,255,0.60);
    border-radius: 28px;
    background:
      radial-gradient(circle at 88% 0%, rgba(244,181,23,0.08), transparent 11rem),
      rgba(255,255,255,0.965);
    box-shadow:
      0 28px 70px rgba(0,0,0,0.28),
      0 1px 0 rgba(255,255,255,0.92) inset;
    -webkit-backdrop-filter: blur(18px) saturate(1.1);
    backdrop-filter: blur(18px) saturate(1.1);
  }

  body.staff-lock-page .staff-lock-header,
  body.staff-lock-page .staff-lock-google,
  body.staff-lock-page .staff-lock-separator,
  body.staff-lock-page .staff-lock-form,
  body.staff-lock-page .staff-lock-error,
  body.staff-lock-page .staff-lock-notice,
  body.staff-lock-page .staff-lock-footer {
    width: 100%;
    max-width: 100%;
  }

  body.staff-lock-page .staff-lock-header {
    text-align: center;
  }

  body.staff-lock-page .staff-lock-header::before {
    content: "STAFF DIGITAL WORKSPACE";
    display: block;
    margin: 0 0 0.5rem;
    color: #a87400;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.17em;
  }

  body.staff-lock-page .staff-lock-mobile-mark {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin: 0 auto 0.7rem;
    filter: drop-shadow(0 8px 16px rgba(10,39,70,0.16));
  }

  body.staff-lock-page .staff-lock-logo {
    display: none;
  }

  body.staff-lock-page .staff-lock-card h1 {
    margin: 0 0 0.55rem;
    color: #0f2540;
    font-size: clamp(1.9rem, 7.5vw, 2.35rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
  }

  body.staff-lock-page .staff-lock-card h1 br {
    display: none;
  }

  body.staff-lock-page .staff-lock-intro {
    max-width: 390px;
    margin: 0 auto;
    color: #68778a;
    font-size: 0.88rem;
    line-height: 1.45;
  }

  body.staff-lock-page .staff-lock-google {
    margin-top: 1rem;
  }

  body.staff-lock-page .staff-lock-google-button,
  body.staff-lock-page .staff-lock-input-wrap > input,
  body.staff-lock-page .staff-lock-primary {
    min-height: 52px;
    border-radius: 15px;
  }

  body.staff-lock-page .staff-lock-google-button {
    border-color: rgba(15,37,64,0.13);
    box-shadow: 0 8px 22px rgba(15,37,64,0.07);
  }

  body.staff-lock-page .staff-lock-separator {
    margin: 1.05rem 0 0.8rem;
    gap: 0.6rem;
    color: #667589;
    font-size: 0.72rem;
  }

  body.staff-lock-page .staff-lock-form {
    margin-top: 0;
  }

  body.staff-lock-page .staff-lock-field label {
    margin-bottom: 0.48rem;
    font-size: 0.85rem;
  }

  body.staff-lock-page .staff-lock-primary {
    margin-top: 0.9rem;
    background: linear-gradient(135deg, #0e2a49 0%, #153f6d 100%);
    box-shadow: 0 12px 30px rgba(15,37,64,0.22);
  }

  body.staff-lock-page .staff-lock-footer {
    margin-top: 1.05rem;
    padding-bottom: 0;
    font-size: 0.76rem;
  }

  body.staff-lock-page .staff-lock-footer a {
    color: #1d69a8;
  }
}

@media (max-width: 430px) {
  body.staff-lock-page .staff-lock-shell {
    padding-left: max(0.7rem, env(safe-area-inset-left));
    padding-right: max(0.7rem, env(safe-area-inset-right));
  }

  body.staff-lock-page .staff-lock-card {
    margin-top: 0.6rem;
    padding: 1.2rem 1rem 1.1rem;
    border-radius: 24px;
  }

  body.staff-lock-page .staff-lock-mobile-mark {
    width: 64px;
    height: 64px;
    margin-bottom: 0.6rem;
  }

  body.staff-lock-page .staff-lock-header::before {
    font-size: 0.61rem;
    margin-bottom: 0.42rem;
  }

  body.staff-lock-page .staff-lock-card h1 {
    font-size: clamp(1.75rem, 8.5vw, 2.05rem);
  }

  body.staff-lock-page .staff-lock-intro {
    font-size: 0.82rem;
  }

  body.staff-lock-page .staff-lock-google {
    margin-top: 0.82rem;
  }

  body.staff-lock-page .staff-lock-google-button,
  body.staff-lock-page .staff-lock-input-wrap > input,
  body.staff-lock-page .staff-lock-primary {
    min-height: 50px;
  }

  body.staff-lock-page .staff-lock-separator {
    margin-top: 0.9rem;
    margin-bottom: 0.68rem;
    font-size: 0.68rem;
  }

  body.staff-lock-page .staff-lock-footer {
    margin-top: 0.9rem;
    font-size: 0.73rem;
  }
}


/* ===== Final lock-screen refinement pass — 2026-09-01 =====
   Polishes the desktop/web composition and lightly tunes phone spacing.
   Keeps the existing auth behavior unchanged. */
@media (min-width: 901px) {
  body.staff-lock-page .staff-lock-shell {
    grid-template-columns: clamp(420px, 31vw, 500px) minmax(0, 1fr);
    background:
      linear-gradient(90deg, #f6f8fb 0%, #f8fbfe 34%, #082340 34%, #071c33 100%);
  }

  body.staff-lock-page .staff-lock-card {
    padding:
      max(2rem, env(safe-area-inset-top))
      clamp(2.15rem, 3.4vw, 4rem)
      max(1.75rem, env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 10% 4%, rgba(244,181,23,0.06), transparent 16rem),
      linear-gradient(180deg, #fbfcfe 0%, #f6f8fb 100%);
    box-shadow: 18px 0 46px rgba(4, 18, 33, 0.09);
  }

  body.staff-lock-page .staff-lock-header,
  body.staff-lock-page .staff-lock-google,
  body.staff-lock-page .staff-lock-separator,
  body.staff-lock-page .staff-lock-form,
  body.staff-lock-page .staff-lock-error,
  body.staff-lock-page .staff-lock-notice,
  body.staff-lock-page .staff-lock-footer {
    max-width: 400px;
  }

  body.staff-lock-page .staff-lock-header {
    position: relative;
  }

  body.staff-lock-page .staff-lock-header::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin-top: 1.05rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #f4b517 0%, rgba(244,181,23,0.28) 100%);
  }

  body.staff-lock-page .staff-lock-logo {
    width: min(100%, 310px);
    margin: 0 0 1.4rem;
  }

  body.staff-lock-page .staff-lock-card h1 {
    margin: 0 0 0.8rem;
    font-size: clamp(2.45rem, 3.45vw, 3.55rem);
    line-height: 0.98;
  }

  body.staff-lock-page .staff-lock-intro {
    max-width: 385px;
    color: #6b7788;
    font-size: clamp(0.94rem, 1.05vw, 1.02rem);
    line-height: 1.55;
  }

  body.staff-lock-page .staff-lock-notice {
    margin-bottom: 1rem;
  }

  body.staff-lock-page .staff-lock-google {
    margin-top: 1.15rem;
  }

  body.staff-lock-page .staff-lock-google-button {
    min-height: 56px;
    border-color: #d6dee8;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(15,37,64,0.045);
  }

  body.staff-lock-page .staff-lock-google-button:hover:not(:disabled) {
    border-color: #bbc8d7;
    box-shadow: 0 8px 18px rgba(15,37,64,0.075);
  }

  body.staff-lock-page .staff-lock-separator {
    margin: 1.3rem 0 0.8rem;
    color: #758398;
    font-size: 0.79rem;
  }

  body.staff-lock-page .staff-lock-field label {
    color: #18324f;
    font-size: 0.9rem;
  }

  body.staff-lock-page .staff-lock-input-wrap > input {
    min-height: 56px;
    border-color: #d2dae4;
    border-radius: 14px;
    background: #fcfdff;
  }

  body.staff-lock-page .staff-lock-primary {
    min-height: 56px;
    margin-top: 1rem;
    border-radius: 14px;
  }

  body.staff-lock-page .staff-lock-footer {
    margin-top: 1.35rem;
    font-size: 0.78rem;
    color: #8f9caf;
  }

  body.staff-lock-page .staff-lock-footer a {
    color: #6f88a3;
    font-weight: 600;
  }

  body.staff-lock-page .staff-lock-visual {
    background:
      radial-gradient(circle at 24% 0%, rgba(79,145,223,0.22), transparent 28%),
      linear-gradient(135deg, #071b31 0%, #08203b 38%, #0a2746 100%);
  }

  body.staff-lock-page .staff-lock-brand-picture {
    inset: 4.5% 3.5% 4.5% 2.75%;
  }

  body.staff-lock-page .staff-lock-brand-art {
    filter: drop-shadow(0 26px 44px rgba(0,0,0,0.16));
  }
}

@media (max-width: 900px) {
  body.staff-lock-page .staff-lock-card {
    width: min(100%, 500px);
  }

  body.staff-lock-page .staff-lock-footer {
    line-height: 1.5;
  }
}

@media (max-width: 430px) {
  body.staff-lock-page .staff-lock-card {
    width: min(100%, 440px);
    margin-top: 0.55rem;
    padding: 1.1rem 0.95rem 1.05rem;
  }

  body.staff-lock-page .staff-lock-mobile-mark {
    width: 58px;
    height: 58px;
    margin-bottom: 0.5rem;
  }

  body.staff-lock-page .staff-lock-card h1 {
    margin-bottom: 0.48rem;
    font-size: clamp(1.62rem, 8vw, 1.95rem);
  }

  body.staff-lock-page .staff-lock-intro {
    max-width: 320px;
    font-size: 0.8rem;
    line-height: 1.38;
  }

  body.staff-lock-page .staff-lock-google {
    margin-top: 0.75rem;
  }

  body.staff-lock-page .staff-lock-separator {
    gap: 0.5rem;
    margin-top: 0.82rem;
    margin-bottom: 0.62rem;
    font-size: 0.66rem;
  }

  body.staff-lock-page .staff-lock-field label {
    margin-bottom: 0.42rem;
    font-size: 0.82rem;
  }

  body.staff-lock-page .staff-lock-google-button,
  body.staff-lock-page .staff-lock-input-wrap > input,
  body.staff-lock-page .staff-lock-primary {
    min-height: 48px;
  }

  body.staff-lock-page .staff-lock-footer {
    margin-top: 0.82rem;
    font-size: 0.71rem;
  }
}


/* ===== Final desktop centering + mobile app-shell fix — 2026-09-01 ===== */
@media (min-width: 901px) {
  /* Keep the desktop artwork optically centered in the browser viewport.
     The small upward shift compensates for the visual weight in the artwork. */
  body.staff-lock-page .staff-lock-visual {
    display: grid;
    place-items: center;
  }

  body.staff-lock-page .staff-lock-brand-picture {
    position: relative;
    inset: auto;
    width: auto;
    height: min(82dvh, 790px);
    max-width: min(90%, 940px);
    aspect-ratio: 1349 / 1166;
    transform: translateY(-1.7vh);
  }

  body.staff-lock-page .staff-lock-brand-art {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }
}

/* On phones/tablets, use a purpose-built app login instead of treating the
   full lock-screen artwork as the page background. This keeps sign-in clearly
   visible and prevents the page from reading as only a lock screen. */
@media (max-width: 900px) {
  body.staff-lock-page {
    min-height: 100dvh;
    background: #eef3f8;
  }

  body.staff-lock-page .staff-lock-shell {
    display: flex;
    min-height: 100dvh;
    padding: 0;
    align-items: stretch;
    justify-content: flex-start;
    background: #eef3f8;
  }

  body.staff-lock-page .staff-lock-visual {
    display: none !important;
  }

  body.staff-lock-page .staff-lock-card {
    display: flex;
    width: min(100%, 520px);
    max-width: 520px;
    min-height: 100dvh;
    margin: 0 auto;
    padding:
      0
      max(1.2rem, calc(env(safe-area-inset-right) + 0.8rem))
      max(1.3rem, calc(env(safe-area-inset-bottom) + 0.9rem))
      max(1.2rem, calc(env(safe-area-inset-left) + 0.8rem));
    border: 0;
    border-radius: 0;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    box-shadow: 0 0 48px rgba(15,37,64,0.10);
    visibility: visible;
    opacity: 1;
    justify-content: flex-start;
  }

  body.staff-lock-page .staff-lock-header {
    width: auto;
    max-width: none;
    margin:
      0
      calc(-1 * max(1.2rem, calc(env(safe-area-inset-right) + 0.8rem)))
      1.3rem
      calc(-1 * max(1.2rem, calc(env(safe-area-inset-left) + 0.8rem)));
    padding:
      max(1.65rem, calc(env(safe-area-inset-top) + 1rem))
      max(1.2rem, calc(env(safe-area-inset-right) + 0.8rem))
      1.45rem
      max(1.2rem, calc(env(safe-area-inset-left) + 0.8rem));
    border-radius: 0 0 28px 28px;
    background:
      radial-gradient(circle at 50% -20%, rgba(63,151,226,0.35), transparent 42%),
      linear-gradient(145deg, #071c33 0%, #0b2c50 55%, #123f6d 100%);
    text-align: center;
    box-shadow: 0 14px 34px rgba(5,25,45,0.16);
  }

  body.staff-lock-page .staff-lock-header::before {
    content: "STAFF DIGITAL WORKSPACE";
    display: block;
    margin: 0 0 0.48rem;
    color: #f4b517;
    font-size: 0.63rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.17em;
  }

  body.staff-lock-page .staff-lock-header::after {
    display: none;
  }

  body.staff-lock-page .staff-lock-mobile-mark {
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 0.58rem;
    object-fit: contain;
    filter: drop-shadow(0 9px 18px rgba(0,0,0,0.18));
  }

  body.staff-lock-page .staff-lock-logo {
    display: none;
  }

  body.staff-lock-page .staff-lock-card h1 {
    margin: 0 0 0.5rem;
    color: #ffffff;
    font-size: clamp(1.8rem, 7vw, 2.2rem);
    font-weight: 800;
    line-height: 1.03;
    letter-spacing: -0.045em;
  }

  body.staff-lock-page .staff-lock-card h1 br {
    display: none;
  }

  body.staff-lock-page .staff-lock-intro {
    max-width: 360px;
    margin: 0 auto;
    color: rgba(235,243,250,0.84);
    font-size: 0.84rem;
    line-height: 1.43;
  }

  body.staff-lock-page .staff-lock-google,
  body.staff-lock-page .staff-lock-separator,
  body.staff-lock-page .staff-lock-form,
  body.staff-lock-page .staff-lock-error,
  body.staff-lock-page .staff-lock-notice,
  body.staff-lock-page .staff-lock-footer {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  body.staff-lock-page .staff-lock-notice {
    margin-top: 0;
    margin-bottom: 0.9rem;
  }

  body.staff-lock-page .staff-lock-google {
    margin-top: 0;
  }

  body.staff-lock-page .staff-lock-google-button,
  body.staff-lock-page .staff-lock-input-wrap > input,
  body.staff-lock-page .staff-lock-primary {
    min-height: 52px;
    border-radius: 14px;
  }

  body.staff-lock-page .staff-lock-google-button {
    border-color: #d9e1ea;
    box-shadow: 0 5px 16px rgba(15,37,64,0.055);
  }

  body.staff-lock-page .staff-lock-separator {
    margin: 1rem 0 0.76rem;
    gap: 0.55rem;
    color: #738196;
    font-size: 0.7rem;
  }

  body.staff-lock-page .staff-lock-form,
  body.staff-lock-page #staff-password-block .staff-lock-form {
    margin-top: 0;
  }

  body.staff-lock-page .staff-lock-field label {
    margin-bottom: 0.48rem;
    font-size: 0.84rem;
  }

  body.staff-lock-page .staff-lock-input-wrap > input {
    border-color: #d4dde7;
    background: #ffffff;
  }

  body.staff-lock-page .staff-lock-primary {
    margin-top: 0.9rem;
    background: linear-gradient(135deg, #0d2947 0%, #153f6d 100%);
    box-shadow: 0 10px 24px rgba(15,37,64,0.18);
  }

  body.staff-lock-page .staff-lock-footer {
    margin-top: 1rem;
    padding-bottom: 0;
    color: #8a98aa;
    font-size: 0.74rem;
    line-height: 1.55;
  }

  body.staff-lock-page .staff-lock-footer a {
    color: #5d7894;
    font-weight: 600;
  }
}

@media (max-width: 430px) {
  body.staff-lock-page .staff-lock-card {
    width: 100%;
    min-height: 100dvh;
    padding-left: max(1rem, calc(env(safe-area-inset-left) + 0.65rem));
    padding-right: max(1rem, calc(env(safe-area-inset-right) + 0.65rem));
  }

  body.staff-lock-page .staff-lock-header {
    margin-right: calc(-1 * max(1rem, calc(env(safe-area-inset-right) + 0.65rem)));
    margin-left: calc(-1 * max(1rem, calc(env(safe-area-inset-left) + 0.65rem)));
    padding-top: max(1.45rem, calc(env(safe-area-inset-top) + 0.85rem));
    padding-bottom: 1.2rem;
    border-radius: 0 0 24px 24px;
  }

  body.staff-lock-page .staff-lock-mobile-mark {
    width: 58px;
    height: 58px;
    margin-bottom: 0.5rem;
  }

  body.staff-lock-page .staff-lock-card h1 {
    font-size: clamp(1.65rem, 8.4vw, 1.95rem);
  }

  body.staff-lock-page .staff-lock-intro {
    max-width: 320px;
    font-size: 0.8rem;
  }

  body.staff-lock-page .staff-lock-google-button,
  body.staff-lock-page .staff-lock-input-wrap > input,
  body.staff-lock-page .staff-lock-primary {
    min-height: 50px;
  }

  body.staff-lock-page .staff-lock-separator {
    margin-top: 0.9rem;
    margin-bottom: 0.68rem;
    font-size: 0.67rem;
  }

  body.staff-lock-page .staff-lock-footer {
    margin-top: 0.85rem;
    font-size: 0.71rem;
  }
}


/* Admin Dashboard: single, plain-language launcher for production workflows. */
.admin-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
.admin-tool-grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-tool-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 116px;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
  box-shadow: var(--shadow-1);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.admin-tool-card strong { font-size: 15px; line-height: 1.25; }
.admin-tool-card span { color: var(--color-text-muted); font-size: 13px; line-height: 1.45; }
.admin-tool-card:hover, .admin-tool-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-3);
  border-color: var(--color-blue-500);
}
@media (max-width: 1100px) { .admin-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .admin-tool-grid, .admin-tool-grid--compact { grid-template-columns: minmax(0, 1fr); } }

/* Department navigation is intentionally horizontally scrollable on phones;
   keep every chip a full touch target so staff can change sections without
   tiny controls or accidental taps. */
@media (max-width: 720px) {
  .dept-section-nav a,
  .dept-section-nav button,
  .category-jump-nav a,
  .dept-tab {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ===== Department resource category accordions =====
   Standard department pages keep each resource category collapsed until the
   employee chooses it. HR intentionally keeps its existing tabbed navigation. */
.dept-category-accordion {
  margin-bottom: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: clip;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.dept-category-accordion:hover { border-color: var(--color-sky-400); }
.dept-category-accordion[open] { box-shadow: var(--shadow-1); border-color: var(--color-border-strong); }
.dept-category-accordion__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 58px;
  padding: var(--space-4);
  cursor: pointer;
  user-select: none;
  background: var(--color-surface);
}
.dept-category-accordion__summary::-webkit-details-marker { display: none; }
.dept-category-accordion__summary::marker { content: ""; }
.dept-category-accordion__summary:focus-visible { outline: 2px solid var(--color-blue-500); outline-offset: -3px; }
.dept-category-accordion__label { min-width: 0; display: flex; align-items: center; gap: var(--space-2); }
.dept-category-accordion__title {
  color: var(--color-heading);
  font-size: var(--fs-sm);
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.dept-category-accordion .dept-subsection__count {
  display: inline-flex;
  min-width: 26px;
  height: 24px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-full);
  align-items: center;
  justify-content: center;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  font-weight: 800;
}
.dept-category-accordion__chevron {
  display: inline-flex;
  color: var(--color-text-muted);
  flex: 0 0 auto;
  transition: transform var(--transition-fast), color var(--transition-fast);
}
.dept-category-accordion[open] .dept-category-accordion__chevron { transform: rotate(180deg); color: var(--color-heading); }
.dept-category-accordion__content {
  padding: 0 var(--space-4) var(--space-4);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
}

/* Stronger information hierarchy across every department page. */
.resource-card__title { font-weight: 800; }
.system-card__name { font-weight: 800; }
.dept-subsection__title { font-weight: 800; color: var(--color-heading); }
.page-section__header h2, .dept-section > h2 { font-weight: 800; }

@media (max-width: 560px) {
  .dept-category-accordion__summary { min-height: 54px; padding: var(--space-3); }
  .dept-category-accordion__content { padding: var(--space-3); }
  .dept-category-accordion__label { align-items: flex-start; }
}

/* Featured department system: use the richer Digital Tool card as the single
   primary entry point when a legacy resource points to the same destination. */
.system-card--department-featured {
  border-color: var(--color-gold-500);
  box-shadow: var(--shadow-2);
}
.system-card--department-featured .system-card__icon {
  background: var(--gradient-gold-accent);
  color: var(--color-navy-950);
}
