/* Teal, burgundy, and ice-blue editorial theme inspired by the supplied reference. */
:root {
  --ref-teal: #4696ae;
  --ref-teal-dark: #1f6378;
  --ref-burgundy: #97002f;
  --ref-burgundy-dark: #720022;
  --ref-ice: #e8f2f4;
  --ref-paper: #fbfaf8;
  --ref-ink: #17313b;
  --ref-muted: #60747b;
  --ref-line: #cfdee1;
}

body { background: var(--ref-paper); color: var(--ref-ink); }
body::selection { background: #c9e4eb; color: var(--ref-burgundy-dark); }

/* Shared navigation. */
header, .navbar { background: rgba(251, 250, 248, .97); border-bottom-color: var(--ref-line); }
header > nav .logo a, .nav-container .logo, header > nav .logo a::before, .nav-container .logo::before { color: var(--ref-ink) !important; }
header > nav .logo a::before, .nav-container .logo::before { background: var(--ref-teal) !important; color: #fff !important; }
header > nav .nav-links a, header > nav .nav-buttons a, nav.navbar .nav-links a { color: #486068 !important; }
header > nav .nav-links a:hover, header > nav .nav-links a.active, header > nav .nav-buttons a:first-child.active { color: var(--ref-burgundy) !important; border-bottom-color: var(--ref-burgundy) !important; }
header > nav .nav-buttons a:last-child, nav.navbar .nav-links .signup-btn { background: var(--ref-burgundy) !important; border-color: var(--ref-burgundy) !important; }
header > nav .nav-buttons a:last-child:hover, nav.navbar .nav-links .signup-btn:hover { background: var(--ref-burgundy-dark) !important; border-color: var(--ref-burgundy-dark) !important; }
.has-logo { display: block; width: min(20rem, 30vw); height: 3.55rem; object-fit: contain; object-position: left center; }
header > nav .logo a { display: flex; align-items: center; min-height: 3.55rem; }
header > nav .logo a::before { display: none !important; }

/* Home hero and primary actions. */
.hero { background: linear-gradient(112deg, var(--ref-paper) 0 56%, var(--ref-ice) 56%); }
.hero h1, .hero h1 span { color: var(--ref-ink); }
.hero h1 span { color: var(--ref-teal); }
.hero-description, .popular-searches { color: var(--ref-muted); }
.hero-support { background: var(--ref-burgundy); box-shadow: 14px 14px 0 var(--ref-teal); }
.hero-support-label { color: #f6c9d7; }
.hero-support-stat { border-color: #c55c7b; }
.hero-support a span { color: #8ee0ed; }
.hero-has-image { display: block; width: 100%; height: 9rem; margin: -32px -32px 1.75rem; width: calc(100% + 64px); border-radius: 4px 26px 0 0; object-fit: cover; object-position: center; filter: saturate(.8) contrast(.96); }
.search-box { border-color: var(--ref-line); box-shadow: 0 12px 30px rgba(23, 49, 59, .10); }
.search-field { border-right-color: var(--ref-line); }
.search-field label { color: var(--ref-teal-dark); }
.search-field input, .search-field select { color: var(--ref-ink); }
.search-button, .auth-button { background: var(--ref-burgundy) !important; }
.search-button:hover, .auth-button:hover { background: var(--ref-burgundy-dark) !important; }
.popular-searches a { color: var(--ref-teal-dark); border-color: var(--ref-line); }
.popular-searches a:hover { border-color: var(--ref-teal); background: var(--ref-ice); }

/* Headings, cards, and sections. */
.page-header, .profile-header, .applications-header, .jobs-page-header { background: var(--ref-ice); }
.page-header h1, .section-heading h2, .section-title h2, .jobs-page-header h1, .applications-header h1, .profile-heading h1, .about-story h2, .about-values h2 { color: var(--ref-ink); }
.page-header p, .section-heading p:not(.section-label), .section-title p, .jobs-page-header p, .applications-header p { color: var(--ref-muted); }
.section-label, .hero-label { color: var(--ref-burgundy) !important; }
.view-all { border-color: var(--ref-teal); color: var(--ref-teal-dark); }
.view-all:hover { background: var(--ref-ice); }
.job-card, .category-card, .search-job-card, .application-card, .profile-card, .application-stat, .filter-sidebar, .detail-card, .saved-empty, .form-section, .auth-container { border-color: var(--ref-line); }
.job-card::before, .category-card::before, .search-job-card::before { background: linear-gradient(90deg, var(--ref-teal), var(--ref-burgundy)); }
.job-card h3, .category-card h3, .search-job-information h3, .application-info h3, .profile-card-header h2 { color: var(--ref-ink); }
.job-card p, .category-card p, .search-job-information p, .application-info p, .about-copy { color: var(--ref-muted); }
.company-logo, .application-card .company-logo { background: var(--ref-ice) !important; color: var(--ref-burgundy) !important; }
.job-type, .status-badge, .job-tags span, .profile-skills span { background: var(--ref-ice) !important; color: var(--ref-teal-dark) !important; }
.company-name, .job-bottom strong, .job-bottom a, .category-card span, .category-card a, .application-status a, .stat-number, .completion-percentage { color: var(--ref-burgundy) !important; }
.category-icon { background: #f1f6f7 !important; color: var(--ref-ink) !important; }
.category-icon::before { color: var(--ref-ink) !important; }
.stats { background: var(--ref-teal-dark); }
.stat-item { border-right-color: #43859a; }
.stat-item p { color: #d7edf1; }
.step-number { color: var(--ref-burgundy); }

/* Forms and the HR application. */
.form-group label, .form-section label, .filter-group h4 { color: var(--ref-ink); }
.form-group input, .form-group select, .form-group textarea, .form-section input, .form-section select, .form-section textarea, .profile-modal textarea { border-color: var(--ref-line); }
.form-group input:focus, .form-section input:focus, .form-section select:focus, .form-section textarea:focus, .profile-modal textarea:focus { border-color: var(--ref-teal); box-shadow: 0 0 0 3px #d9eef2; }
.password-box button, .form-options a, .terms-group a, .auth-register a, .add-row { color: var(--ref-burgundy) !important; }
.application-intro, .detail-hero { background: linear-gradient(112deg, var(--ref-paper) 0 58%, var(--ref-ice) 58%); border-left-color: var(--ref-burgundy); }
.application-intro h1, .detail-hero h1 { color: var(--ref-ink); }
.cta, .cta-section, .detail-sidebar { background: var(--ref-burgundy); }
.cta .section-label, .cta-section .section-label, .detail-sidebar .section-label { color: #f7c6d4 !important; }
.cta-button { background: #fff !important; color: var(--ref-burgundy) !important; }
.cta-button:hover { background: #f4ebee !important; }
.detail-secondary-link { color: #f5d3dd; }
.saved-empty { box-shadow: 12px 12px 0 var(--ref-teal); }
.saved-empty span { background: var(--ref-ice); color: var(--ref-burgundy); }

/* Employment application: grouped, secure-field presentation. */
.employment-application .form-note {
  margin: -0.25rem 0 1.4rem;
  max-width: 68rem;
  color: #536e77;
  font-size: 1rem;
  line-height: 1.6;
}

.employment-application .form-section {
  border-color: #c8dde3;
  box-shadow: 0 8px 24px rgba(31, 99, 120, 0.055);
}

.employment-application .form-section h2 {
  color: var(--ref-teal-dark);
}

/* Contact page. */
.contact-hero { background: var(--ref-ice); padding: 7rem 0 5.5rem; }
.contact-hero h1, .contact-intro h2 { color: var(--ref-ink); font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -0.045em; }
.contact-hero h1 { max-width: 70rem; font-size: clamp(3.5rem, 7vw, 6.75rem); line-height: .98; margin: .8rem 0 1.5rem; }
.contact-hero p:not(.section-label) { max-width: 43rem; color: var(--ref-muted); font-size: 1.18rem; line-height: 1.65; }
.contact-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(22rem, .84fr); gap: clamp(3rem, 9vw, 9rem); padding-top: 7.5rem; padding-bottom: 7.5rem; align-items: center; }
.contact-intro h2 { max-width: 36rem; margin: .8rem 0 1.35rem; font-size: clamp(3rem, 5vw, 5rem); line-height: 1.02; }
.contact-intro > p:not(.section-label) { max-width: 30rem; color: var(--ref-muted); font-size: 1.12rem; line-height: 1.65; }
.contact-actions { display: flex; gap: .7rem; margin-top: 1.65rem; }
.contact-primary, .contact-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.25rem; font-weight: 700; text-decoration: none; }
.contact-primary { background: var(--ref-burgundy); color: #fff; }
.contact-primary:hover { background: var(--ref-burgundy-dark); }
.contact-secondary { border: 1px solid var(--ref-teal); color: var(--ref-teal-dark); }
.contact-secondary:hover { background: var(--ref-ice); }
.contact-details { margin: 0; padding: 1.9rem 2rem; background: var(--ref-ice); font-style: normal; }
.contact-details div { padding: 1.05rem 0; border-bottom: 1px solid #cbdde1; }
.contact-details div:first-child { padding-top: 0; }
.contact-details div:last-child { padding-bottom: 0; border-bottom: 0; }
.contact-details span { display: block; margin-bottom: .35rem; color: var(--ref-teal-dark); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.contact-details a, .contact-details p { margin: 0; color: var(--ref-ink); font-weight: 600; line-height: 1.35; text-decoration: none; }
.contact-details a:hover { color: var(--ref-burgundy); }

/* Final layout pass: restore the shared page width and make job search controls readable. */
.container {
  width: min(1440px, calc(100% - 96px));
  margin-right: auto;
  margin-left: auto;
}

.featured-jobs {
  width: min(1440px, calc(100% - 96px));
  margin: 0 auto;
  padding: 6rem 0;
}

.section-header { gap: 1.5rem; }
.section-header h2 { font-size: clamp(2.6rem, 4vw, 4.4rem) !important; line-height: 1.03; }
.section-header p { max-width: 42rem; font-size: 1.15rem !important; line-height: 1.6; }
.view-all { display: inline-flex; align-items: center; min-height: 3.25rem; padding: 0 1.35rem; font-size: 1rem; font-weight: 700; }

.jobs-page {
  width: min(1440px, calc(100% - 96px));
  max-width: none;
  margin: 0 auto;
  padding: 4.5rem 0 6rem;
}

.jobs-search {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 10rem;
  gap: 0;
  margin-bottom: 3.4rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ref-line);
  border-radius: .75rem;
  box-shadow: 10px 10px 0 var(--ref-teal);
}

.jobs-search-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 6.8rem;
  padding: 1.1rem 1.4rem;
  border-right: 1px solid var(--ref-line);
}

.jobs-search-field label {
  margin-bottom: .48rem;
  color: var(--ref-teal-dark);
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.jobs-search-field input,
.jobs-search-field select {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ref-ink);
  font-size: 1.08rem !important;
  font-weight: 600;
}

.jobs-search .search-button {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--ref-burgundy);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.jobs-layout { grid-template-columns: 19rem minmax(0, 1fr); gap: 2rem; }
.filter-sidebar { padding: 1.8rem !important; border: 1px solid var(--ref-line) !important; border-radius: .75rem; box-shadow: none; }
.filter-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.filter-header h3 { margin: 0; font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 1.7rem; font-weight: 800; }
.filter-header button { padding: .45rem .7rem; border: 1px solid var(--ref-teal); background: #fff; color: var(--ref-teal-dark); font-size: .88rem; font-weight: 700; cursor: pointer; }
.filter-group { padding: 1.35rem 0; }
.filter-group h4 { margin: 0 0 .9rem; font-size: .8rem; }
.filter-option { gap: .65rem; margin-bottom: .75rem; font-size: .98rem; }
#salary-filter, #sortJobs { min-height: 2.8rem; padding: 0 .8rem; border: 1px solid var(--ref-line); border-radius: .45rem; background: #fff; color: var(--ref-ink); font-size: .95rem; }
.results-header { margin-bottom: 1.4rem; }
.results-header h2 { margin: 0; font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 1.9rem; font-weight: 800; }
.results-header p { margin-top: .25rem; font-size: 1rem; }

.search-job-card { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1.35rem; padding: 2rem !important; margin-bottom: 1.25rem; border: 1px solid var(--ref-line) !important; border-radius: .75rem; box-shadow: 0 5px 18px rgba(23, 49, 59, .055); }
.search-job-card .company-logo { width: 4.5rem; height: 4.5rem; margin: 0; border-radius: .75rem; font-size: 1.12rem; }
.search-job-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.search-job-top h3 { margin: .55rem 0 .25rem; font-size: 1.55rem !important; line-height: 1.15; }
.company-name { margin: 0; font-size: 1.05rem !important; }
.job-location { margin: .9rem 0; font-size: .98rem; }
.job-tags { gap: .5rem; margin-top: 1rem; }
.job-tags span { padding: .45rem .78rem; font-size: .83rem; }
.search-job-bottom { margin-top: 1.25rem; padding-top: 1rem; gap: 1rem; }
.search-job-bottom strong, .search-job-bottom span, .search-job-bottom a { font-size: .92rem !important; }

/* How it works: give the four-step process the same readable scale as the cards. */
.how-it-works {
  width: min(1440px, calc(100% - 96px));
  margin: 0 auto;
  padding: 6rem 0;
}
.how-it-works .section-heading { margin-bottom: 3rem; }
.how-it-works .section-heading h2 { font-size: clamp(2.6rem, 4vw, 4.3rem) !important; }
.how-it-works .section-heading p:not(.section-label) { font-size: 1.12rem !important; }
.steps { gap: 0; border-top: 1px solid var(--ref-line); border-bottom: 1px solid var(--ref-line); }
.step { min-height: 18rem; padding: 2.5rem 2rem; border-right: 1px solid var(--ref-line); text-align: left; }
.step:last-child { border-right: 0; }
.step-number { width: auto; height: auto; margin: 0 0 3.4rem; padding: 0; border-radius: 0; background: transparent; color: var(--ref-burgundy); font-size: .95rem; font-weight: 800; letter-spacing: .16em; }
.step h3 { margin: 0 0 .85rem; color: var(--ref-ink); font-size: 1.35rem; line-height: 1.2; }
.step p { margin: 0; color: var(--ref-muted); font-size: 1rem; line-height: 1.65; }

/* Closing call to action. */
.cta {
  width: min(1440px, calc(100% - 96px));
  margin: 0 auto 6rem;
  padding: 6.5rem 2rem;
  text-align: center;
  background: var(--ref-burgundy);
}
.cta-content { max-width: 54rem; margin: 0 auto; }
.cta .section-label { margin-bottom: 1.25rem; color: #f8cbd8 !important; font-size: .82rem !important; }
.cta h2 { margin: 0 0 1.35rem; color: #fff; font-size: clamp(2.6rem, 4.4vw, 4.5rem) !important; line-height: 1.06; }
.cta p:not(.section-label) { max-width: 42rem; margin: 0 auto 2rem; color: #fff; font-size: 1.15rem; line-height: 1.65; }
.cta .cta-button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.85rem; padding: 0 1.6rem; background: #fff !important; color: var(--ref-burgundy) !important; font-size: 1.05rem; font-weight: 800; }
.cta .cta-button:hover { background: #f3e9ec !important; transform: translateY(-2px); }

.contact-hero { padding: 5.5rem 0 4.5rem; }
.contact-hero h1 { max-width: 58rem; font-size: clamp(3.25rem, 5.4vw, 5.2rem); line-height: 1.02; }
.contact-hero p:not(.section-label) { font-size: 1.12rem; }
.contact-content { grid-template-columns: minmax(0, .92fr) minmax(26rem, .78fr); gap: clamp(3rem, 8vw, 8rem); padding-top: 5.5rem; padding-bottom: 5.5rem; }
.contact-intro h2 { font-size: clamp(2.9rem, 4.2vw, 4.35rem); line-height: 1.06; }
.contact-details { padding: 2.3rem 2.4rem; border-radius: .75rem; }
.contact-details a, .contact-details p { font-size: 1rem; }

/* In-page job browser and local-account feedback. */
.has-open-modal { overflow: hidden; }
.jobs-modal[hidden] { display: none; }
.jobs-modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 1.5rem; }
.jobs-modal-backdrop { position: absolute; inset: 0; background: rgba(16, 43, 52, .62); backdrop-filter: blur(4px); }
.jobs-modal-dialog { position: relative; width: min(100%, 1050px); max-height: min(88vh, 900px); overflow: auto; padding: 2.1rem; border-radius: 1rem; background: var(--ref-paper); box-shadow: 0 26px 80px rgba(15, 38, 46, .3); }
.jobs-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; padding-bottom: 1.45rem; border-bottom: 1px solid var(--ref-line); }
.jobs-modal-header h2 { margin: .45rem 0 0; color: var(--ref-ink); font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; }
.jobs-modal-close { display: grid; flex: 0 0 auto; width: 2.75rem; height: 2.75rem; place-items: center; border: 1px solid var(--ref-line); border-radius: 50%; background: #fff; color: var(--ref-ink); font-size: 1.7rem; cursor: pointer; }
.jobs-modal-close:hover { border-color: var(--ref-burgundy); color: var(--ref-burgundy); }
.jobs-modal-search { display: grid; grid-template-columns: 1fr 14rem; gap: .8rem; margin: 1.5rem 0 .85rem; }
.jobs-modal-search input, .jobs-modal-search select { min-height: 3.25rem; padding: 0 .95rem; border: 1px solid var(--ref-line); border-radius: .5rem; background: #fff; color: var(--ref-ink); font: inherit; }
.jobs-modal-search input:focus, .jobs-modal-search select:focus { outline: 0; border-color: var(--ref-teal); box-shadow: 0 0 0 3px #d9eef2; }
.jobs-modal-count { margin: 0 0 1.25rem; color: var(--ref-muted); font-size: .95rem; }
.portal-job-list { display: grid; gap: .85rem; }
.portal-job-card { display: grid; grid-template-columns: 3.8rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1.25rem; border: 1px solid var(--ref-line); border-radius: .75rem; background: #fff; }
.portal-job-mark { display: grid; width: 3.8rem; height: 3.8rem; place-items: center; border-radius: .65rem; background: var(--ref-ice); color: var(--ref-burgundy); font-size: .95rem; font-weight: 800; }
.portal-job-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.portal-job-top span { display: inline-block; padding: .22rem .55rem; border-radius: 999px; background: var(--ref-ice); color: var(--ref-teal-dark); font-size: .75rem; font-weight: 800; }
.portal-job-top h3 { margin: .35rem 0 .2rem; color: var(--ref-ink); font-size: 1.25rem; }
.portal-job-top p { margin: 0; color: var(--ref-muted); font-size: .92rem; }
.portal-job-top strong { white-space: nowrap; color: var(--ref-teal-dark); font-size: .9rem; }
.portal-job-skills { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.portal-job-skills i { padding: .25rem .5rem; border-radius: 999px; background: #f2f6f7; color: var(--ref-muted); font-size: .75rem; font-style: normal; }
.portal-job-card button { min-height: 3rem; padding: 0 1rem; border: 0; border-radius: .45rem; background: var(--ref-burgundy); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.portal-job-card button:hover { background: var(--ref-burgundy-dark); transform: translateY(-1px); }
.portal-empty { margin: 0; padding: 2rem; border: 1px dashed var(--ref-line); color: var(--ref-muted); text-align: center; }
.auth-message { min-height: 1.4rem; margin: 1rem 0 0; font-size: .92rem; line-height: 1.45; }
.auth-message.error { color: #9d193a; }

/* Always-visible current jobs: fast browsing without changing pages. */
.posted-jobs { padding: 5.5rem 0; background: #fff; }
.posted-jobs-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.posted-jobs-heading h2 { margin: .45rem 0 .7rem; color: var(--ref-ink); font-size: clamp(2.6rem, 4.5vw, 4.5rem); line-height: 1.03; }
.posted-jobs-heading p:not(.section-label) { max-width: 44rem; margin: 0; color: var(--ref-muted); font-size: 1.08rem; line-height: 1.6; }
.posted-jobs-apply { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.2rem; border-radius: .45rem; background: var(--ref-burgundy); color: #fff; font-weight: 800; text-decoration: none; }
.posted-jobs-apply:hover { background: var(--ref-burgundy-dark); transform: translateY(-1px); }
.posted-jobs-filters { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: .8rem; padding: 1rem; border: 1px solid var(--ref-line); border-radius: .75rem; background: var(--ref-paper); }
.posted-jobs-filters label { display: grid; gap: .4rem; color: var(--ref-teal-dark); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.posted-jobs-filters input, .posted-jobs-filters select { min-height: 3rem; padding: 0 .9rem; border: 1px solid var(--ref-line); border-radius: .45rem; background: #fff; color: var(--ref-ink); font: inherit; font-size: 1rem; font-weight: 600; letter-spacing: normal; text-transform: none; }
.posted-jobs-count { margin: 1.25rem 0; color: var(--ref-muted); font-size: .95rem; }
.posted-job-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.posted-job-grid .portal-job-card { grid-template-columns: 3.3rem minmax(0, 1fr); align-items: start; padding: 1.35rem; }
.posted-job-grid .portal-job-mark { width: 3.3rem; height: 3.3rem; }
.posted-job-grid .portal-job-card button { grid-column: 2; width: fit-content; margin-top: .4rem; }

/* Official HAS imagery keeps the portal connected to the parent website. */
.has-showcase { display: grid; grid-template-columns: minmax(0, .82fr) minmax(25rem, 1.18fr); gap: clamp(2rem, 6vw, 6.5rem); width: min(1440px, calc(100% - 96px)); margin: 0 auto; padding: 6rem 0; align-items: center; }
.has-showcase-copy h2 { max-width: 34rem; margin: .55rem 0 1.2rem; color: var(--ref-ink); font-size: clamp(2.45rem, 4.2vw, 4.25rem); line-height: 1.06; }
.has-showcase-copy > p:not(.section-label) { max-width: 33rem; margin: 0 0 1.5rem; color: var(--ref-muted); font-size: 1.08rem; line-height: 1.7; }
.has-showcase-copy a { color: var(--ref-teal-dark); font-size: 1rem; font-weight: 800; text-decoration: none; }
.has-showcase-copy a span { color: var(--ref-burgundy); }
.has-showcase-images { display: grid; grid-template-columns: 1fr .74fr; gap: 1rem; align-items: end; }
.has-showcase-images img { display: block; width: 100%; min-height: 15rem; border-radius: .9rem; object-fit: cover; box-shadow: 12px 12px 0 var(--ref-ice); }
.has-showcase-images img:first-child { height: 25rem; }
.has-showcase-images img:last-child { height: 18rem; }
.portal-auth-modal[hidden], .portal-application-modal[hidden] { display: none; }
.portal-auth-modal, .portal-application-modal { position: fixed; z-index: 1010; inset: 0; display: grid; place-items: center; padding: 1.5rem; }
.portal-auth-dialog { position: relative; width: min(100%, 31rem); padding: 2.25rem; border-radius: 1rem; background: var(--ref-paper); box-shadow: 0 26px 80px rgba(15, 38, 46, .3); }
.portal-auth-dialog > .jobs-modal-close { position: absolute; top: 1rem; right: 1rem; }
.portal-auth-dialog h2 { margin: .45rem 0 .8rem; color: var(--ref-ink); font-size: 2.1rem; }
.portal-auth-copy { margin: 0 0 1.4rem; color: var(--ref-muted); line-height: 1.55; }
.portal-auth-form { display: grid; gap: .9rem; }
.portal-auth-form label { display: grid; gap: .35rem; color: var(--ref-ink); font-size: .9rem; font-weight: 800; }
.portal-auth-form small { color: var(--ref-muted); font-size: .76rem; font-weight: 400; }
.portal-auth-form input { min-height: 3rem; padding: 0 .8rem; border: 1px solid var(--ref-line); border-radius: .45rem; background: #fff; color: var(--ref-ink); font: inherit; font-weight: 400; }
.portal-auth-form button { min-height: 3.25rem; margin-top: .35rem; border: 0; border-radius: .45rem; background: var(--ref-burgundy); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.portal-auth-form button:hover { background: var(--ref-burgundy-dark); }
.portal-auth-switch { padding: 0; border: 0; background: transparent; color: var(--ref-teal-dark); font: inherit; font-size: .92rem; font-weight: 800; cursor: pointer; }
.portal-auth-switch:hover { color: var(--ref-burgundy); }
.portal-application-dialog { position: relative; width: min(100%, 80rem); height: min(92vh, 58rem); overflow: hidden; border-radius: 1rem; background: #fff; box-shadow: 0 26px 80px rgba(15, 38, 46, .3); }
.portal-application-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--ref-line); background: var(--ref-paper); }
.portal-application-header h2 { margin: .2rem 0 0; color: var(--ref-ink); font-size: 1.45rem; }
#applicationFrame { display: block; width: 100%; height: calc(100% - 5.75rem); border: 0; background: #fff; }
body.portal-embedded header, body.portal-embedded footer { display: none; }
body.portal-embedded .employment-application { width: min(100% - 2.5rem, 1180px); padding-top: 2rem; padding-bottom: 3rem; }
body.portal-embedded .application-intro { margin-top: 0; }

@media (max-width: 700px) {
  .jobs-modal { padding: .75rem; }
  .jobs-modal-dialog { max-height: 92vh; padding: 1.25rem; }
  .jobs-modal-search { grid-template-columns: 1fr; }
  .portal-job-card { grid-template-columns: 3.25rem minmax(0, 1fr); }
  .portal-job-mark { width: 3.25rem; height: 3.25rem; }
  .portal-job-card button { grid-column: 1 / -1; width: 100%; }
  .portal-job-top { display: block; }
  .portal-job-top strong { display: inline-block; margin-top: .55rem; }
  .posted-jobs { padding: 4rem 0; }
  .posted-jobs-heading { display: block; }
  .posted-jobs-apply { margin-top: 1.25rem; }
  .posted-jobs-filters, .posted-job-grid { grid-template-columns: 1fr; }
  .posted-job-grid .portal-job-card button { grid-column: 1 / -1; width: 100%; }
  .has-showcase { grid-template-columns: 1fr; width: min(100% - 40px, 1440px); padding: 4rem 0; }
  .has-showcase-images img:first-child, .has-showcase-images img:last-child { height: 15rem; min-height: auto; }
  .portal-auth-modal, .portal-application-modal { padding: .75rem; }
  .portal-auth-dialog { padding: 1.6rem 1.25rem; }
  .portal-application-dialog { height: 94vh; }
  .portal-application-header { padding: .85rem 1rem; }
}

/* Cohesion pass: shared rhythm and surfaces across the portal. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
a, button, input, select, textarea { transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease; }
button, select { font-family: inherit; }

.page-header, .jobs-page-header, .applications-header, .profile-header {
  padding-top: 5.5rem;
  padding-bottom: 5rem;
}
.page-header h1, .jobs-page-header h1, .applications-header h1, .profile-heading h1 {
  max-width: 54rem;
  font-size: clamp(3rem, 5.2vw, 5rem) !important;
  line-height: 1.03;
}
.page-header p, .jobs-page-header p, .applications-header p, .profile-heading p { max-width: 42rem; font-size: 1.12rem; line-height: 1.65; }

.categories-page, .about-story, .about-values, .applications-page, .profile-page { padding-top: 5.5rem; padding-bottom: 5.5rem; }
.category-grid { gap: 1.4rem; }
.category-card { min-height: 19rem; padding: 2rem; border-radius: .75rem; }
.category-card h3 { margin: 1.1rem 0 .75rem; font-size: 1.45rem; line-height: 1.16; }
.category-card p { font-size: 1rem; line-height: 1.6; }
.category-card span { display: block; margin-top: 1.35rem; font-size: 1rem; font-weight: 800; }
.category-card a { display: inline-flex; margin-top: 1rem; font-size: .98rem; font-weight: 800; }

.about-story, .about-values { width: min(1440px, calc(100% - 96px)); margin: 0 auto; }
.about-story { gap: clamp(2.5rem, 8vw, 8rem); }
.about-story h2, .about-values h2 { font-size: clamp(2.5rem, 4vw, 4rem) !important; line-height: 1.08; }
.about-copy p { font-size: 1.08rem; line-height: 1.75; }
.value-grid { gap: 1.35rem; }
.value-card { min-height: 16rem; padding: 2rem; border-radius: .75rem; }
.value-card h3 { font-size: 1.35rem; }
.value-card p { font-size: 1rem; line-height: 1.65; }

.application-stats { gap: 1.25rem; }
.application-stat { min-height: 10rem; border-radius: .75rem; }
.applications-page .application-card, .profile-card { border-radius: .75rem; }
.applications-page .application-card { padding: 1.8rem; }
.profile-page { width: min(1440px, calc(100% - 96px)); margin: 0 auto; }

.auth-section { padding: 5.5rem 1.25rem; }
.auth-container { border-radius: .85rem; box-shadow: 0 16px 42px rgba(23, 49, 59, .1); }

.employment-application { padding-top: 5rem; }
.employment-application .application-intro { border-left-color: var(--ref-burgundy); border-radius: .75rem; }
.employment-application .form-section { border-radius: .75rem; }
.employment-application .form-section h2 { font-size: 1.55rem; }
.employment-application input, .employment-application textarea { border-radius: .45rem; }

.detail-page { padding-top: 5rem; }
.detail-hero, .detail-card, .detail-sidebar { border-radius: .75rem; }
.saved-page .page-header { margin-bottom: 0; }

@media (max-width: 900px) {
  .page-header, .jobs-page-header, .applications-header, .profile-header { padding-top: 4.25rem; padding-bottom: 4rem; }
  .categories-page, .about-story, .about-values, .applications-page, .profile-page { padding-top: 4rem; padding-bottom: 4rem; }
  .about-story, .about-values, .profile-page { width: min(100% - 40px, 1440px); }
  .category-card { min-height: auto; }
}

/* Footer. */
footer, footer.footer { background: var(--ref-ink); }
.footer-bottom { border-color: #38505a; }
.footer-brand p, .footer-column a, .footer-grid p, .footer-grid a { color: #d7e7ea; }

@media (max-width: 760px) {
  .hero { background: linear-gradient(145deg, var(--ref-paper) 0 58%, var(--ref-ice) 58%); }
  .hero-support { box-shadow: 8px 8px 0 var(--ref-teal); }
  .has-logo { width: min(16.5rem, 62vw); height: 3rem; }
  header > nav .logo a { min-height: 3rem; }
  .hero-has-image { height: 10rem; margin: -32px -32px 1.5rem; width: calc(100% + 64px); }
  .contact-hero { padding: 4.8rem 0 4rem; }
  .contact-content { grid-template-columns: 1fr; gap: 3rem; padding-top: 4.5rem; padding-bottom: 4.5rem; }
  .container, .featured-jobs, .jobs-page { width: min(100% - 40px, 1440px); }
  .featured-jobs { padding: 4rem 0; }
  .jobs-search { grid-template-columns: 1fr; box-shadow: 6px 6px 0 var(--ref-teal); }
  .jobs-search-field { min-height: 5.4rem; border-right: 0; border-bottom: 1px solid var(--ref-line); }
  .jobs-search .search-button { min-height: 3.7rem; }
  .jobs-layout { grid-template-columns: 1fr; }
  .filter-sidebar { display: block !important; }
  .search-job-card { grid-template-columns: 1fr; }
  .how-it-works { width: min(100% - 40px, 1440px); padding: 4rem 0; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: auto; padding: 2rem 1.25rem; border-right: 0; border-bottom: 1px solid var(--ref-line); }
  .step:last-child { border-bottom: 0; }
  .step-number { margin-bottom: 1.2rem; }
  .cta { width: min(100% - 40px, 1440px); margin-bottom: 4rem; padding: 4.5rem 1.25rem; }
}

/* Phone-first navigation and touch layouts. */
.mobile-nav-toggle { display: none; }

@media (max-width: 760px) {
  body { overflow-x: hidden; }
  header > nav, nav.navbar .nav-container {
    width: min(100% - 28px, 1440px) !important;
    min-height: 4.5rem !important;
    padding: .7rem 0 !important;
    gap: .65rem !important;
    flex-wrap: wrap !important;
  }
  header > nav .logo, nav.navbar .logo { min-width: 0; flex: 1 1 auto; }
  .has-logo { width: min(14.25rem, 58vw); height: 2.65rem; }
  header > nav .logo a { min-height: 2.65rem; }
  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.85rem;
    padding: 0 .78rem;
    border: 1px solid var(--ref-line);
    border-radius: .45rem;
    background: #fff;
    color: var(--ref-ink);
    font: inherit;
    font-size: .92rem;
    font-weight: 800;
    cursor: pointer;
  }
  .mobile-nav-toggle > span:first-child { margin-right: .36rem; font-size: 1.3rem; line-height: 1; }
  header > nav .nav-links, nav.navbar .nav-links,
  header > nav .nav-buttons {
    display: none !important;
    width: 100%;
    margin: 0 !important;
    overflow: visible !important;
  }
  header > nav.mobile-nav-open .nav-links, nav.navbar .nav-container.mobile-nav-open .nav-links {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .15rem .75rem !important;
    order: 4;
    padding: .7rem 0 .25rem;
    border-top: 1px solid var(--ref-line);
  }
  header > nav.mobile-nav-open .nav-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: .65rem !important;
    order: 5;
    padding: .55rem 0 .2rem;
  }
  header > nav .nav-links a, nav.navbar .nav-links a,
  header > nav .nav-buttons a {
    min-height: 2.75rem !important;
    padding: 0 .2rem !important;
    border-bottom-width: 1px !important;
    font-size: .96rem !important;
  }
  header > nav .nav-buttons a { justify-content: center; }
  header > nav .nav-buttons a:last-child { min-height: 2.85rem !important; padding: 0 .75rem !important; border-radius: .45rem !important; }

  .hero { min-height: auto; padding: 3.6rem 1.25rem 3.25rem; }
  .hero h1 { max-width: 18ch; font-size: clamp(2.65rem, 12vw, 4rem); line-height: 1; }
  .hero-description { font-size: 1.02rem; line-height: 1.65; }
  .hero-label, .section-label { font-size: .72rem !important; }
  .search-box { margin-top: 1.75rem; padding: .45rem; border-radius: .7rem; box-shadow: 6px 6px 0 var(--ref-teal); }
  .search-field { min-height: 4.9rem; padding: .7rem .85rem; }
  .search-field input, .search-field select { min-height: 2.1rem; font-size: 1rem; }
  .search-button { min-height: 3.35rem; margin: .2rem; border-radius: .45rem; font-size: 1rem; }
  .popular-searches { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.4rem; }
  .popular-searches p { width: 100%; margin: 0; }
  .popular-searches a { margin: 0; padding: .5rem .7rem; border: 1px solid var(--ref-line); border-radius: 999px; }
  .hero-support { width: 100%; padding: 1.5rem; box-shadow: 7px 7px 0 var(--ref-teal); }
  .hero-has-image { height: 9rem; margin: -1.5rem -1.5rem 1.25rem; width: calc(100% + 3rem); border-radius: .55rem .55rem 0 0; }
  .hero-support h2 { font-size: 2rem; }
  .hero-support-stat { padding: .8rem 0; }
  .hero-support-stat strong { font-size: 1.5rem; }

  .posted-jobs, .featured-jobs, .has-showcase, .how-it-works { padding-top: 3.25rem; padding-bottom: 3.25rem; }
  .posted-jobs-heading h2, .section-heading h2, .section-title h2 { font-size: clamp(2.15rem, 10vw, 3.1rem) !important; }
  .posted-jobs-heading p:not(.section-label), .section-heading p:not(.section-label) { font-size: 1rem !important; }
  .posted-jobs-apply { width: 100%; min-height: 3.25rem; margin-top: 1.1rem; }
  .posted-jobs-filters { gap: .85rem; padding: .8rem; border-radius: .6rem; }
  .posted-jobs-filters input, .posted-jobs-filters select { min-height: 3.2rem; font-size: 1rem; }
  .posted-job-grid .portal-job-card, .portal-job-card { gap: .85rem; padding: 1.05rem; }
  .portal-job-top h3 { font-size: 1.18rem; }
  .portal-job-top strong { font-size: .96rem; }
  .portal-job-skills i { font-size: .78rem; }
  .portal-job-card button { min-height: 3.2rem; font-size: 1rem; }
  .stats { width: min(100% - 28px, 1440px); margin: 0 auto; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: .65rem; }
  .stat-item { min-height: 7.6rem; padding: 1.25rem; border-bottom: 1px solid #38505a; }
  .stat-item:nth-child(2n) { border-right: 0; }
  .stat-item:nth-last-child(-n+2) { border-bottom: 0; }
  .stat-item h2 { font-size: 1.85rem; }

  .has-showcase { width: min(100% - 28px, 1440px); gap: 2.15rem; }
  .has-showcase-copy h2 { font-size: clamp(2.1rem, 10vw, 3rem); }
  .has-showcase-images { gap: .7rem; }
  .has-showcase-images img:first-child, .has-showcase-images img:last-child { height: 12rem; }
  .has-showcase-images img { box-shadow: 6px 6px 0 var(--ref-ice); }

  .page-header, .jobs-page-header, .applications-header, .profile-header, .contact-hero { padding: 3.25rem 0 3rem; }
  .page-header h1, .jobs-page-header h1, .applications-header h1, .profile-heading h1, .contact-hero h1 { font-size: clamp(2.45rem, 11vw, 3.55rem) !important; }
  .page-header p, .jobs-page-header p, .applications-header p, .profile-heading p, .contact-hero p:not(.section-label) { font-size: 1rem; }
  .contact-content { gap: 2.2rem; padding-top: 3.25rem; padding-bottom: 3.25rem; }
  .contact-intro h2 { font-size: clamp(2.35rem, 11vw, 3.3rem); }
  .contact-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .contact-actions a { min-height: 3.15rem; display: inline-flex; align-items: center; justify-content: center; }
  .contact-details { padding: 1.5rem; }

  .portal-auth-modal, .portal-application-modal { padding: 0; align-items: end; }
  .portal-auth-dialog, .portal-application-dialog { width: 100%; border-radius: 1rem 1rem 0 0; }
  .portal-auth-dialog { max-height: 92vh; overflow: auto; padding: 1.75rem 1.15rem 1.35rem; }
  .portal-auth-dialog h2 { max-width: 13ch; font-size: 1.85rem; }
  .portal-auth-form input, .portal-auth-form button { min-height: 3.25rem; font-size: 1rem; }
  .portal-application-dialog { height: 96vh; }
  .portal-application-header { min-height: 4.35rem; padding: .7rem 1rem; }
  .portal-application-header h2 { font-size: 1.05rem; }
  .portal-application-header .jobs-modal-close { width: 2.45rem; height: 2.45rem; font-size: 1.45rem; }
  #applicationFrame { height: calc(100% - 4.35rem); }
  body.portal-embedded .employment-application { width: min(100% - 1.4rem, 1180px); padding-top: 1rem; padding-bottom: 2rem; }
  body.portal-embedded .application-intro { padding: 1.5rem 1.1rem; }
  body.portal-embedded .application-intro h1 { font-size: 2rem; }
  body.portal-embedded .form-section { padding: 1rem; }
  body.portal-embedded .form-section h2 { font-size: 1.35rem; }
  body.portal-embedded .employment-application input, body.portal-embedded .employment-application textarea { min-height: 3rem; font-size: 1rem; }
}

@media (max-width: 380px) {
  .mobile-nav-toggle-text { display: none; }
  .mobile-nav-toggle > span:first-child { margin-right: 0; }
  header > nav.mobile-nav-open .nav-links, nav.navbar .nav-container.mobile-nav-open .nav-links { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat-item, .stat-item:nth-child(2n) { border-right: 0; border-bottom: 1px solid #38505a; }
  .stat-item:last-child { border-bottom: 0; }
  .has-showcase-images { grid-template-columns: 1fr; }
  .has-showcase-images img:first-child, .has-showcase-images img:last-child { height: 13rem; }
}

/* HAS Portal Development palette: blue, burgundy, and airy blue surfaces. */
:root {
  --ref-teal: #408fac;
  --ref-teal-dark: #276f89;
  --ref-burgundy: #910029;
  --ref-burgundy-dark: #6f0020;
  --ref-ice: #ecf4f7;
  --ref-paper: #fbfdfe;
  --ref-line: #c9dfe7;
  --ref-ink: #183745;
  --ref-muted: #5d7380;
}

.hero { background: linear-gradient(112deg, var(--ref-paper) 0 56%, var(--ref-ice) 56%); }
.hero-support { box-shadow: 14px 14px 0 var(--ref-teal); }
.has-clickable-image {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}
.has-clickable-image img { transition: transform .3s ease, filter .3s ease; }
.has-clickable-image:hover img { transform: scale(1.035); filter: saturate(1.06); }
.has-clickable-image:focus-visible { outline: 3px solid var(--ref-burgundy); outline-offset: 4px; }
.hero-has-image-button { margin: -32px -32px 1.75rem; width: calc(100% + 64px); border-radius: 4px 26px 0 0; }
.hero-has-image-button .hero-has-image { margin: 0; width: 100%; }
.has-showcase-images > .has-clickable-image { min-height: 15rem; border-radius: .9rem; box-shadow: 12px 12px 0 var(--ref-ice); }
.has-showcase-images > .has-clickable-image img { display: block; width: 100%; min-height: 15rem; border-radius: .9rem; object-fit: cover; }
.has-showcase-images > .has-clickable-image:first-child img { height: 25rem; }
.has-showcase-images > .has-clickable-image:last-child img { height: 18rem; }

.has-gallery { padding: 5.5rem 0; background: var(--ref-ice); }
.has-gallery-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.has-gallery-heading h2 { max-width: 34rem; margin: .45rem 0 0; color: var(--ref-ink); font-size: clamp(2.45rem, 4.2vw, 4.2rem); line-height: 1.05; }
.has-gallery-heading > p { max-width: 31rem; margin: 0; color: var(--ref-muted); font-size: 1.06rem; line-height: 1.65; }
.has-gallery-grid { display: grid; grid-template-columns: 1.1fr .9fr 1fr; gap: 1rem; }
.has-gallery-grid .has-clickable-image { min-height: 20rem; border-radius: .8rem; box-shadow: 8px 8px 0 rgba(64, 143, 172, .26); }
.has-gallery-grid img { display: block; width: 100%; height: 100%; min-height: 20rem; object-fit: cover; }
.has-gallery-grid .has-clickable-image:nth-child(2) { transform: translateY(2rem); }

.has-image-viewer[hidden] { display: none; }
.has-image-viewer { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 2rem; }
.has-image-viewer-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(10, 33, 43, .82); cursor: zoom-out; }
.has-image-viewer-content { position: relative; z-index: 1; display: grid; max-width: min(92vw, 75rem); max-height: 88vh; margin: 0; padding: .75rem; border-radius: .85rem; background: #fff; box-shadow: 0 28px 90px rgba(0, 0, 0, .35); }
.has-image-viewer-content img { display: block; max-width: 100%; max-height: calc(88vh - 4.5rem); margin: 0 auto; object-fit: contain; }
.has-image-viewer-content figcaption { padding: .7rem .25rem .1rem; color: var(--ref-ink); font-size: .94rem; font-weight: 700; }
.has-image-viewer-close { position: absolute; top: -.95rem; right: -.95rem; display: grid; width: 2.75rem; height: 2.75rem; place-items: center; border: 0; border-radius: 50%; background: var(--ref-burgundy); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.has-image-viewer-close:hover { background: var(--ref-burgundy-dark); }

@media (max-width: 760px) {
  .hero-has-image-button { margin: -1.5rem -1.5rem 1.25rem; width: calc(100% + 3rem); border-radius: .55rem .55rem 0 0; }
  .has-showcase-images > .has-clickable-image { min-height: auto; box-shadow: 6px 6px 0 var(--ref-ice); }
  .has-showcase-images > .has-clickable-image:first-child img, .has-showcase-images > .has-clickable-image:last-child img { height: 15rem; min-height: auto; }
  .has-gallery { padding: 3.5rem 0 4rem; }
  .has-gallery-heading { display: block; margin-bottom: 1.5rem; }
  .has-gallery-heading h2 { font-size: clamp(2.15rem, 10vw, 3.05rem); }
  .has-gallery-heading > p { margin-top: 1rem; font-size: 1rem; }
  .has-gallery-grid { grid-template-columns: 1fr; gap: .8rem; }
  .has-gallery-grid .has-clickable-image, .has-gallery-grid img { min-height: 15rem; }
  .has-gallery-grid .has-clickable-image:nth-child(2) { transform: none; }
  .has-image-viewer { padding: .8rem; }
  .has-image-viewer-content { max-width: 100%; max-height: 92vh; padding: .5rem; }
  .has-image-viewer-content img { max-height: calc(92vh - 4rem); }
  .has-image-viewer-close { top: -.65rem; right: -.35rem; }
}
