:root {
  --navy: #102b46;
  --navy2: #1b4668;
  --ink: #172b3d;
  --muted: #4b5f70;
  --line: #cbd5df;
  --paper: #ffffff;
  --surface: #f3f6f9;
  --surface-alt: #eaf1f7;
  --blue: #075ea8;
  --blue2: #06477e;
  --blue-light: #e6f1fb;
  --green: #176b43;
  --greenbg: #e7f4ec;
  --amber: #754500;
  --amberbg: #fff2d9;
  --red: #8b2525;
  --redbg: #fde8e8;
  --purple: #5c3584;
  --purplebg: #f3ecf8;
  --focus: #ffbf47;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(16, 43, 70, 0.08);
  --shadow-md: 0 4px 14px rgba(16, 43, 70, 0.1);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

/* ========================================================
   Responsive Device-Type Typography System
   Adapts base scale and fluid clamp per device category
   ======================================================== */
html {
  scroll-behavior: smooth;
  font-size: 16px; /* Default desktop baseline */
}

/* 1. Large screens & 4K displays (>= 1440px) */
@media screen and (min-width: 1440px) {
  html {
    font-size: 17px;
  }
}

/* 2. Standard Laptops & Desktops (1025px - 1439px) */
@media screen and (min-width: 1025px) and (max-width: 1439px) {
  html {
    font-size: 16px;
  }
}

/* 3. Tablets, Netbooks & iPads (769px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  html {
    font-size: 15px;
  }
}

/* 4. Large Mobile & Phablets (481px - 768px) */
@media screen and (min-width: 481px) and (max-width: 768px) {
  html {
    font-size: 14.5px;
  }
}

/* 5. Compact Mobile Phones (<= 480px) */
@media screen and (max-width: 480px) {
  html {
    font-size: 14px;
  }
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--blue2);
  text-decoration-thickness: 0.14em;
}

button, input, select {
  font: inherit;
  min-height: 44px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  top: -5rem;
  left: 1rem;
  background: #000;
  color: #fff;
  padding: 0.8rem 1.2rem;
  z-index: 1000;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(1200px, calc(100% - 2rem));
  margin: auto;
}

/* Top bar with accessibility notice and cache status indicator */
.topline {
  background: var(--surface-alt);
  color: #203d56;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.topline .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.cache-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.cache-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  animation: pulse 2.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Header */
header {
  background: var(--navy);
  color: white;
  border-bottom: 3px solid #28547c;
}

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.brand:hover {
  color: #e2f0fc;
}

.mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1b4668, #075ea8);
  border: 2px solid #b9d8ef;
  border-radius: 12px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.02em;
}

.brand small {
  display: block;
  font-size: 0.75rem;
  color: #c8d9e7;
  font-weight: 500;
  letter-spacing: 0;
}

.review-highlight {
  background: #fde047;
  color: #0f172a;
  font-weight: 800;
  padding: 0.06rem 0.38rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
  display: inline-block;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

nav a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #ffffff;
  text-decoration: none;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-weight: 650;
  font-size: 0.95rem;
  transition: background 0.15s ease;
}

nav a:hover,
nav a[aria-current="page"] {
  background: #1b4668;
  color: #ffffff;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #102b46 0%, #174266 50%, #1e5684 100%);
  color: #ffffff;
  padding: 2.8rem 0 3.2rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 800;
  color: #bce1ff;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

h1 {
  font-size: clamp(1.65rem, 3.8vw + 0.5rem, 3rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
  max-width: 17ch;
  color: #ffffff;
}

.hero p {
  color: #e2edf5;
  max-width: 58ch;
  font-size: clamp(0.92rem, 1vw + 0.6rem, 1.05rem);
  line-height: 1.6;
  margin: 0 0 1.2rem;
}

/* Hero Search Box powered by Trie */
.searchbox {
  background: #ffffff;
  color: var(--ink);
  padding: 1.4rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(10, 26, 43, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.searchbox label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.45rem;
  font-size: 1.02rem;
  color: var(--navy);
}

.searchrow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper input {
  padding-left: 2.4rem;
  padding-right: 2rem;
  font-size: 1rem;
  border: 2px solid #8fa5ba;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input-wrapper input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7, 94, 168, 0.2);
}

.search-icon {
  position: absolute;
  left: 0.8rem;
  color: var(--muted);
  pointer-events: none;
}

.clear-search-btn {
  position: absolute;
  right: 0.6rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  min-height: auto;
  border-radius: 50%;
  display: none;
}

.clear-search-btn:hover {
  color: var(--ink);
  background: #eaf1f7;
}

.search-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-size: 0.82rem;
}

.trie-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--green);
  font-weight: 700;
  background: var(--greenbg);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

/* Quick Search Suggestions */
.quick-tags {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.quick-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--navy);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  min-height: 28px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.quick-btn:hover {
  background: var(--blue-light);
  border-color: var(--blue);
  color: var(--blue2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.primary {
  background: var(--blue);
  color: #ffffff;
}

.primary:hover {
  background: var(--blue2);
  color: #ffffff;
}

.secondary {
  background: #ffffff;
  border-color: #8ca3b7;
  color: var(--navy);
}

.secondary:hover {
  background: #edf4f9;
  border-color: var(--navy);
}

.soft {
  background: var(--surface-alt);
  color: var(--navy);
  border-color: #a8bfd1;
}

.soft:hover {
  background: #dde8f1;
}

.btn-sm {
  min-height: 34px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

/* Trust Bar */
main {
  padding: 2rem 0 4rem;
}

.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.trust article {
  display: flex;
  gap: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-alt);
  font-weight: 900;
  color: var(--navy);
  border: 1px solid #c2d6e7;
}

/* Main Grid & Filters */
.layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 1.8rem;
  align-items: start;
}

.filters-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  display: flex;
  flex-direction: column;
}

.filters-panel::-webkit-scrollbar {
  width: 6px;
}

.filters-panel::-webkit-scrollbar-track {
  background: transparent;
}

.filters-panel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.filters-panel::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.filters-panel select {
  padding: 0.45rem 0.65rem;
  font-size: 0.84rem;
  min-height: 38px;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: -1.1rem;
  background: var(--surface);
  z-index: 2;
  margin-top: -0.2rem;
  padding-top: 0.2rem;
}

.filter-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--navy);
}

.reset-link {
  font-size: 0.82rem;
  color: var(--blue);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  min-height: auto;
  font-weight: 600;
}

.reset-link:hover {
  text-decoration: underline;
}

.filter-group {
  margin-bottom: 0.85rem;
}

.filter-search-group {
  margin-bottom: 1rem;
}

.filter-search-group .search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.filter-search-group .search-input-wrapper input {
  width: 100%;
  padding-left: 2.2rem;
  padding-right: 2rem;
  font-size: 0.88rem;
  height: 2.35rem;
  border-radius: 6px;
  background: #ffffff;
  border: 1.5px solid #94a3b8;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.filter-search-group .search-input-wrapper input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7, 94, 168, 0.15);
  outline: none;
}

.filter-search-group .search-icon {
  position: absolute;
  left: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
  pointer-events: none;
}

.filter-search-group .clear-search-btn {
  position: absolute;
  right: 0.45rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.1rem 0.4rem;
  min-height: auto;
  border-radius: 50%;
  display: none;
  line-height: 1;
}

.filter-search-group .clear-search-btn:hover {
  color: var(--ink);
  background: #eaf1f7;
}

.filter-group label {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

/* Age Scaler Component */
.age-scaler-group {
  background: var(--paper);
  border: 1px solid #d1dce5;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.85rem;
}

.mobile-filter-toggle {
  display: none;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.8rem;
  cursor: pointer;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
}

.mobile-filter-toggle:hover {
  background: #e2e8f0;
  border-color: var(--blue);
}

.age-display-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #ffffff;
  padding: 0.18rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 3px rgba(16, 43, 70, 0.14);
  transition: all 0.18s ease;
  min-width: 44px;
  text-align: center;
}

.age-display-badge.is-any {
  background: var(--surface-alt);
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: none;
  font-weight: 600;
}

.scaler-slider-wrap {
  margin-top: 0.5rem;
}

.scaler-slider-wrap input[type="range"] {
  width: 100%;
  cursor: pointer;
  height: 6px;
  accent-color: var(--blue);
  border-radius: 3px;
  background: #cbd5e1;
  padding: 0;
  border: none;
}

.scaler-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 0.25rem;
}

.quick-age-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.65rem;
}

.age-pill {
  padding: 0.2rem 0.5rem;
  min-height: 26px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.15s ease;
}

.age-pill:hover {
  background: #f1f5f9;
  border-color: var(--blue);
}

.age-pill.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.age-pill:disabled,
.age-pill.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: #e2e8f0;
  background: #f1f5f9;
  color: #94a3b8;
}

select option:disabled {
  color: #94a3b8;
  background-color: #f8fafc;
}

.tag.tag-age {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-weight: 700;
}

.filter-group label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.filter-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-pill {
  background: #ffffff;
  border: 1px solid #9db2c4;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  min-height: 32px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  background: #edf4f9;
  border-color: var(--blue);
}

.filter-pill[aria-pressed="true"] {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.filter-pill .pill-count {
  font-size: 0.72rem;
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}

.filter-pill[aria-pressed="true"] .pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Active filter chips */
.active-filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.6rem 0.8rem;
  background: var(--surface-alt);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.filter-status-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

.filter-status-banner.banner-active {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.filter-status-banner.banner-all {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.filter-status-banner.banner-expired {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.hint-toggle-btn {
  background: #ffffff;
  border: 1px solid currentColor;
  color: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.2rem 0.65rem;
  min-height: 28px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hint-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #ffffff;
  border: 1px solid #8ca3b7;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}

.active-chip button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  min-height: auto;
  font-size: 0.95rem;
  line-height: 1;
}

.active-chip button:hover {
  color: var(--red);
}

/* Results header */
.resultshead {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--surface-alt);
}

.result-count-label {
  font-size: 1.1rem;
  color: var(--navy);
}

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-wrapper select {
  width: auto;
  min-width: 170px;
}

/* Job Cards */
.joblist {
  display: grid;
  gap: 1.1rem;
}

.job {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius);
  padding: 1.3rem;
  background: #ffffff !important;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.job:hover {
  box-shadow: var(--shadow-md);
  border-color: #a3bcd1 !important;
}

.jobhead {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.job-title-area h3 {
  font-size: clamp(1.05rem, 1.1vw + 0.55rem, 1.25rem);
  line-height: 1.32;
  margin: 0.3rem 0 0.2rem;
  color: var(--navy);
}

.org {
  color: var(--muted);
  font-size: clamp(0.82rem, 0.3vw + 0.65rem, 0.92rem);
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.org-badge {
  font-weight: 700;
  color: var(--ink);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.6rem 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #edf2f6;
  color: #263f55;
  font-size: 0.78rem;
  font-weight: 700;
}

.tag.open {
  background: var(--greenbg);
  color: var(--green);
  border: 1px solid #badcc5;
}

.tag.soon {
  background: var(--amberbg);
  color: var(--amber);
  border: 1px solid #ebd094;
}

.tag.upcoming {
  background: var(--purplebg);
  color: var(--purple);
  border: 1px solid #dbc3e8;
}

.tag.closed,
.tag.expired {
  background: #ffffff;
  color: #dc2626;
  border: 1.5px solid #dc2626;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.deadline-expired {
  color: #b91c1c !important;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-new {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #dc2626;
  color: #ffffff !important;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.45);
  line-height: 1.25;
}

.tag.badge-verified {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tag.badge-unverified {
  background: #fffbeb;
  color: #b45309;
  border: 1.5px solid #fde68a;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tag.tag-released {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.tag.sector-badge {
  background: #e1ebf4;
  color: var(--navy);
}

/* Key Metadata Grid */
.meta {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  margin: 0.9rem 0;
  border-block: 1px solid #e3e9ee;
  background: #fafbfc;
  border-radius: 8px;
}

.meta > div {
  display: flex;
  flex-direction: column;
}

.meta .label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.meta strong {
  font-size: 0.95rem;
  font-weight: 750;
  color: var(--ink);
}

.jobactions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-google {
  background: #f8fafc;
  border: 1px solid #94a3b8;
  color: #1e3a8a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-google:hover {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

.google-search-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.google-icon {
  display: inline-block;
  flex-shrink: 0;
  border-radius: 2px;
  vertical-align: middle;
}

.google-search-link:hover {
  color: var(--blue2);
}

.save {
  background: white;
  border: 1px solid #8ca3b7;
  color: var(--navy);
}

.save[aria-pressed="true"] {
  background: var(--surface-alt);
  border-color: var(--blue);
  color: var(--blue2);
}

.source {
  background: #f1f6fa;
  border-left: 4px solid #6b8ba6;
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem;
  margin-top: 0.9rem;
  color: #29445b;
  font-size: 0.88rem;
}

.verified-stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--green);
  font-weight: 700;
}

.unverified-stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #b45309;
  font-weight: 700;
}

/* Empty State */
.empty {
  border: 2px dashed #91a3b2;
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  text-align: center;
  background: #f8fafc;
}

.empty h3 {
  color: var(--navy);
  margin: 0 0 0.5rem;
}

.empty p {
  color: var(--muted);
  margin: 0 0 1.2rem;
}

/* Pages */
.page {
  display: none;
}

.page.active {
  display: block;
}

.pageintro {
  padding: 1.5rem 0 1rem;
}

.pageintro h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  color: var(--navy);
  margin: 0 0 0.4rem;
}

.pageintro p {
  max-width: 75ch;
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.tile h3 {
  margin: 0 0 0.4rem;
  color: var(--navy);
}

.tile p {
  color: var(--muted);
  margin: 0.35rem 0 0.9rem;
}

/* Modal / Drawer for Job Specifications */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 43, 70, 0.6);
  backdrop-filter: blur(2px);
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius);
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.modal-header h2 {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
  color: var(--navy);
}

.modal-close-btn {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--muted);
}

.modal-close-btn:hover {
  background: #edf4f9;
  color: var(--ink);
}

.modal-body {
  padding: 1.5rem;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.spec-table th,
.spec-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.spec-table th {
  width: 30%;
  background: var(--surface);
  color: var(--navy);
  font-weight: 700;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--navy);
  color: #ffffff;
  padding: 0.85rem 1.2rem;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-left: 4px solid var(--focus);
  animation: slideIn 0.25s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer */
footer {
  background: var(--navy);
  color: #e5edf4;
  padding: 3rem 0 2rem;
  border-top: 4px solid #28547c;
}

footer a {
  color: #bce1ff;
}

footer a:hover {
  color: #ffffff;
}

.footgrid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer li {
  margin-bottom: 0.5rem;
}

.footbottom {
  border-top: 1px solid #325575;
  margin-top: 2rem;
  padding-top: 1.2rem;
  font-size: 0.85rem;
  color: #b0c4d6;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* AI Agent management pill */
.ai-agent-pill {
  background: #1e4d75;
  color: #fff;
  border: 1px solid #4a7aa3;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Responsive adjustments with device-type typography scaling */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .mobile-filter-toggle {
    display: flex;
    font-size: 0.88rem;
  }
  .filters-panel {
    display: none;
    position: static;
    max-height: none;
    overflow-y: visible;
    margin-bottom: 1rem;
  }
  .filters-panel.is-open {
    display: flex;
    animation: fadeIn 0.2s ease;
  }
  .meta {
    grid-template-columns: repeat(3, 1fr);
    font-size: 0.86rem;
    padding: 0.65rem 0.8rem;
  }
  .meta .label {
    font-size: 0.72rem;
  }
  .meta strong {
    font-size: 0.88rem;
  }
  .trust, .grid3 {
    grid-template-columns: 1fr;
  }
  .footgrid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 650px) {
  .brand {
    font-size: 1.15rem;
  }
  .topline {
    font-size: 0.8rem;
  }
  .pageintro h2 {
    font-size: 1.35rem;
  }
  .pageintro p {
    font-size: 0.86rem;
  }
  .resultshead {
    font-size: 0.86rem;
  }
  .meta {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
    padding: 0.65rem 0.75rem;
  }
  .meta .label {
    font-size: 0.68rem;
  }
  .meta strong {
    font-size: 0.84rem;
  }
  .tag {
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
  }
  .jobactions {
    gap: 0.4rem;
  }
  .jobactions .btn {
    font-size: 0.82rem;
    padding: 0.4rem 0.65rem;
  }
  .source {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
  .brand {
    font-size: 1.05rem;
  }
  nav ul {
    gap: 0.15rem;
  }
  nav a {
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }
  .meta {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
  }
  .job-title-area h3 {
    font-size: 1.02rem;
  }
  .footgrid {
    grid-template-columns: 1fr;
  }
  .searchbox label {
    font-size: 0.92rem;
  }
  .searchrow input {
    font-size: 16px; /* prevent iOS auto-zoom */
  }
}

/* Shared AdSense-safe visual styling for bottom banner & side rails */
.ad-slot-container,
.ad-rail {
  background: var(--surface-alt);
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 0.65rem;
  text-align: center;
  overflow: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-slot-container {
  margin: 1.25rem 0;
  min-height: 100px;
  display: flex;
}

.ad-slot-label {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

/* Outer 3-Column Page Shell with Left & Right Side Advertisement Rails */
.page-shell {
  width: 100%;
}

.ad-rail {
  display: none;
}

.ad-rail-placeholder {
  font-size: 0.82rem;
  color: var(--muted);
}

@media (min-width: 1440px) {
  .page-shell {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 180px;
    gap: 1.25rem;
    max-width: 1760px;
    margin: 0 auto;
    padding: 0 1rem;
    align-items: start;
  }

  .main-shell-center.wrap {
    width: 100%;
    margin: 0;
  }

  .ad-rail {
    display: flex;
    position: sticky;
    top: 5.5rem;
    min-height: 600px;
    margin-top: 1.5rem;
  }
}

@media (min-width: 1680px) {
  .page-shell {
    grid-template-columns: 220px minmax(0, 1fr) 220px;
    gap: 1.5rem;
  }
}
