/* ===== 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 {
  background: linear-gradient(120deg, var(--color-navy-950) 0%, var(--color-navy-800) 55%, var(--color-blue-700, #17588f) 100%);
  color: var(--color-white);
  padding: var(--space-8) 0 var(--space-7);
  position: relative;
  overflow: hidden;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 88% 12%, rgba(240, 188, 69, 0.28), transparent 40%),
    radial-gradient(circle at 78% 75%, rgba(106, 182, 236, 0.24), transparent 45%),
    radial-gradient(circle at 15% 90%, rgba(240, 188, 69, 0.12), transparent 40%);
  pointer-events: none;
}
.hero__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: var(--space-8); align-items: center;
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; gap: var(--space-6); } }
.hero__content { max-width: 600px; }

/* Brandmark treatment -- the only existing logo asset has a baked-in
   white background (see docs/LOGO_AUDIT.md); showing it large here
   would put a visible white rectangle across the hero. Cropping to
   just the icon (same treatment as the sidebar-collapsed mark) plus a
   real text wordmark reads as an intentional brandmark, not a
   fallback, and needs no image background at all. Swap the crop for a
   full transparent SVG/PNG the moment one exists. */
.hero__brandmark { display: flex; flex-direction: column; line-height: 1.15; margin-bottom: var(--space-5); }
.hero__brandmark-word { font-weight: 800; font-size: var(--fs-lg); letter-spacing: var(--ls-tight); color: var(--color-white); }
.hero__brandmark-sub { font-weight: 700; font-size: var(--fs-xs); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--color-gold-400); }

.hero__eyebrow { color: var(--color-gold-100); font-weight: 700; font-size: var(--fs-sm); letter-spacing: var(--ls-wide); text-transform: uppercase; margin-bottom: var(--space-2); }
/* Homepage-hero-only: the second brand line's "Highlands Brain" half, in
   the same brand-gold token as the sibling .hero__brandmark-sub line
   above it, distinct from .hero__eyebrow's own lighter gold used for the
   "Powered by" half. Scoped to this one span -- .hero__eyebrow itself is
   shared with the Department and Academic Services page headers and was
   not changed. */
.hero__eyebrow-brand { color: var(--color-gold-400); }
.hero__greeting { color: var(--color-gold-100); font-weight: 700; font-size: var(--fs-sm); letter-spacing: var(--ls-wide); text-transform: uppercase; margin-bottom: var(--space-2); }
.hero h1 { color: var(--color-white); font-size: var(--fs-3xl); letter-spacing: var(--ls-tight); }
.hero p { color: #eef3f9; font-size: var(--fs-md); max-width: 560px; }
.hero__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-5); }

.hero__search { position: relative; margin-top: var(--space-5); max-width: 480px; }
.hero__search-icon { position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%); color: var(--color-navy-700); display: flex; }
.hero__search input {
  width: 100%; padding: var(--space-4) var(--space-4) var(--space-4) calc(var(--space-4) + 28px);
  border: none; border-radius: var(--radius-full); font-size: var(--fs-md);
  box-shadow: var(--shadow-3); transition: box-shadow var(--transition-fast);
}
.hero__search input:focus-visible { box-shadow: var(--shadow-3), 0 0 0 3px rgba(232,169,31,0.45); outline: none; }

/* Right-side decorative illustration -- forward-path lines, connected
   dots, layered translucent shapes. Pure SVG/CSS, no stock imagery. */
.hero__art { position: relative; height: 340px; display: block; }
@media (max-width: 900px) { .hero__art { display: none; } }
.hero__art svg { width: 100%; height: 100%; }
.hero__art-shape { position: absolute; border-radius: 50%; filter: blur(0px); opacity: 0.16; }

/* ===== 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; }
}

/* ===== 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-navy-900); }
.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; }
.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; }
.glance-card--gold .glance-card__icon { background: var(--gradient-gold-accent); color: var(--color-navy-950); }
.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); border: 1px solid transparent; }
.announcement-card--high-priority { background: var(--color-warning-bg); }
.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-navy-900); 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: break-word; }
.resource-row__desc { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 2px; overflow-wrap: break-word; }

/* ===== 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 { position: relative; max-width: 560px; margin-bottom: var(--space-4); }
.header-search__icon { position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%); color: var(--color-text-muted); display: flex; align-items: center; font-size: 16px; }
.header-search input {
  width: 100%; padding: var(--space-3) var(--space-4) var(--space-3) calc(var(--space-4) + 24px);
  border: 1px solid var(--color-border); border-radius: var(--radius-full);
  background: var(--color-surface); color: var(--color-text); min-height: 46px;
  font-size: var(--fs-md);
}
.header-search input:focus-visible { outline: none; border-color: var(--color-blue-500); box-shadow: 0 0 0 3px rgba(106,182,236,0.25); }

/* ===== 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: var(--color-text-muted); 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; gap: var(--space-2); margin-top: var(--space-4);
  overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--space-1);
}
.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: 640px) {
  .category-jump-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .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); }

/* 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); }
}

/* 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-navy-900); 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));
}
