/* ==========================================================
   DxJOBS design tokens
   Color scheme deliberately different from DxNEWS (teal) and
   DxTENDERS (blue) — a magenta/violet accent, chosen 2026-09-12
   specifically because it reads as visually distinct from BOTH
   DxNEWS's teal AND DxTENDERS's blue at a glance (the project's
   original amber/orange was too close to how DxTENDERS was
   actually rendering live, per a side-by-side screenshot
   comparison — see the source-recolor notes in icons/ if this
   ever needs revisiting). The --amber/--amber-deep/--amber-tint/
   --new variable NAMES were kept as-is to avoid touching every
   call site — only their color VALUES changed.
   ========================================================== */
:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --ink: #171310;
  --ink-soft: #58504A;
  --ink-faint: #948A80;
  --line: #E7DFD3;

  --black: #0E0E10;
  --black-soft: #201C18;

  --amber: #DB70D2;
  --amber-deep: #97208E;
  --amber-tint: #FAE1F8;

  --remote: #2C6E7F;
  --remote-tint: #E4F0F2;
  --new: #821779;
  --closed: #948A80;

  --dept1: #E8871E;
  --dept2: #2C6E7F;
  --dept3: #6C5B85;
  --dept4: #A0522D;
  --dept5: #4C7A3F;

  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;

  --radius: 14px;
  --max-width: 760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--black);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

a { color: var(--amber-deep); }
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ==========================================================
   Top bar
   ========================================================== */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark {
  border-radius: 8px;
  display: block;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: #FFFFFF;
  letter-spacing: 0.2px;
}
.wordmark-accent { color: var(--amber); }
.topnav a {
  color: #E9E2D8;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.topnav a:hover { color: var(--amber); }

/* ==========================================================
   Live status strip
   ========================================================== */
.live-strip {
  background: var(--black-soft);
  border-bottom: 1px solid #34302B;
}
.live-strip-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 16px;
  color: #E9E2D8;
}
.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.pulse {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.pulse-tick {
  width: 2px;
  background: var(--amber);
  animation: pulseGrow 1.2s ease-in-out infinite;
  border-radius: 1px;
}
.pulse-tick:nth-child(1) { height: 4px; animation-delay: 0s; }
.pulse-tick:nth-child(2) { height: 8px; animation-delay: 0.15s; }
.pulse-tick:nth-child(3) { height: 12px; animation-delay: 0.3s; }
.pulse-tick:nth-child(4) { height: 7px; animation-delay: 0.45s; }
.pulse-tick:nth-child(5) { height: 5px; animation-delay: 0.6s; }
@keyframes pulseGrow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.live-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--amber);
}
.live-note {
  margin: 0 0 10px;
  font-size: 13px;
  color: #C9BFB2;
}
.live-meta {
  display: flex;
  gap: 20px;
  margin: 0;
  flex-wrap: wrap;
}
.live-meta > div { display: flex; flex-direction: column; }
.live-meta dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #948A80;
}
.live-meta dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  font-family: var(--font-mono);
}
.live-refresh-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: #948A80;
}

/* ==========================================================
   Search + filters
   ========================================================== */
.controls {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 16px 0;
}
.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.search-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 15px;
  color: var(--ink);
  font-family: var(--font-body);
}
.search-input:focus {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}
.remote-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  color: var(--ink-soft);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.remote-toggle input { accent-color: var(--amber); }

.filters {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* Same class of bug already fixed once for .overlay: an author rule
   setting display:flex has equal-or-higher precedence than the browser's
   default [hidden]{display:none} UA rule, so without this, #category-filters
   would render visible even while its "hidden" attribute is set. */
.filters[hidden] { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.filter-chip.is-active {
  background: var(--black);
  border-color: var(--black);
  color: #FFFFFF;
}

/* ==========================================================
   Feed / job cards
   ========================================================== */
.feed {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feed-loading, .feed-empty {
  color: var(--ink-faint);
  font-size: 14px;
  text-align: center;
  padding: 40px 16px;
}
.card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  position: relative;
}
.card.is-new { border-color: var(--amber); }

.demo-flag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 8px;
}

.card-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.dept-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.card-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink);
}
.card-company {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
}
.card-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.meta-tag {
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
}
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  padding: 3px 8px;
  letter-spacing: 0.2px;
}
.badge-new {
  background: var(--amber-tint);
  color: var(--new);
}
.badge-remote {
  background: var(--remote-tint);
  color: var(--remote);
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-source {
  font-size: 12px;
  color: var(--ink-faint);
}
.card-time {
  font-size: 12px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* ==========================================================
   Job detail overlay
   ========================================================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 16, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}
.overlay[hidden] { display: none; }
@media (min-width: 640px) {
  .overlay { align-items: center; }
}
.overlay-panel {
  background: var(--surface);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 18px 18px 0 0;
  padding: 24px 20px 32px;
  position: relative;
}
@media (min-width: 640px) {
  .overlay-panel { border-radius: 18px; }
}
.overlay-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
}
.overlay-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 8px 30px 4px 0;
}
.overlay-company {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.overlay-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}
.overlay-meta-item dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ink-faint);
  margin-bottom: 2px;
}
.overlay-meta-item dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.overlay-apply {
  display: block;
  text-align: center;
  background: var(--amber);
  color: #1A1005;
  font-weight: 700;
  text-decoration: none;
  border-radius: 10px;
  padding: 13px;
  margin-bottom: 14px;
}
.overlay-apply:hover { background: var(--amber-deep); color: #fff; }
.overlay-source-note {
  font-size: 12px;
  color: var(--ink-faint);
  text-align: center;
  margin: 0 0 4px;
}

/* ==========================================================
   Footer
   ========================================================== */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 16px 60px;
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.6;
}
.site-footer a { color: var(--ink-soft); }
.credit-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.credit-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  text-decoration: none;
  background: none;
  border: none;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.credit-avatar { border-radius: 50%; display: block; }
.dot { color: var(--line); }

/* ==========================================================
   About page
   ========================================================== */
.about-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 16px 60px;
}
.about-main h1 {
  font-family: var(--font-display);
  font-size: 26px;
  margin-bottom: 4px;
}
.about-main h2 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 28px 0 8px;
}
.about-main p, .about-main li {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.65;
}
.about-main ul { padding-left: 20px; }
.source-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 13.5px;
}
.source-table th, .source-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.source-table th {
  color: var(--ink-faint);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.3px;
}

/* ==========================================================
   Contact form (shared with DxNEWS pattern)
   ========================================================== */
.overlay-panel.contact-panel { max-width: 480px; }
.contact-heading {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 4px 30px 4px 0;
}
.contact-intro { font-size: 14px; color: var(--ink-soft); margin: 0 0 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 12px 0 6px;
  color: var(--ink);
}
.optional-tag, .required-tag {
  font-weight: 400;
  color: var(--ink-faint);
  font-size: 12px;
}
.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
}
.form-input:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.hidden-field { position: absolute; left: -9999px; }
.form-submit {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: var(--black);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.form-submit:hover { background: var(--amber-deep); }
.form-status { font-size: 13px; margin: 10px 0 0; min-height: 18px; }
.privacy-notice { font-size: 11.5px; color: var(--ink-faint); margin-top: 14px; }
