:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1a2233;
  --muted: #6b7280;
  --primary: #2557a7;
  --primary-dark: #1c4380;
  --accent: #e8f0fe;
  --border: #e4e7ec;
  --green: #0a8754;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.muted { color: var(--muted); font-size: 0.875rem; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-size: 0.9rem;
}
.header-nav a { margin-left: 18px; color: var(--muted); font-weight: 500; }
.header-nav a:hover { color: var(--primary); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 48px 0 40px;
  text-align: center;
}
.hero h1 { margin: 0 0 8px; font-size: 2rem; }
.hero-sub { margin: 0 0 24px; opacity: 0.9; }
.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.metric {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 12px 20px;
  min-width: 120px;
}
.metric-count { display: block; font-size: 1.3rem; font-weight: 700; }
.metric-label { font-size: 0.8rem; opacity: 0.9; }

/* Blocks */
.block { margin: 36px 0; }
.block-title { font-size: 1.25rem; margin: 0 0 16px; }

/* Grids */
.grid { display: grid; gap: 14px; }
.grid-cities { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.grid-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16,24,40,0.12); }

.city-card { display: flex; align-items: center; gap: 12px; padding: 12px; }
.city-img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.city-meta { display: flex; flex-direction: column; }
.city-name { font-weight: 600; }

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 18px 12px;
}
.tile-icon { width: 44px; height: 44px; object-fit: contain; }
.tile-title { font-weight: 600; font-size: 0.95rem; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }

/* Breadcrumb */
.breadcrumb { padding: 16px 0; color: var(--muted); font-size: 0.875rem; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* Listing */
.list-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.list-head h1 { font-size: 1.5rem; margin: 0; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

.job-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.job-card:hover { border-color: var(--primary); }
.job-card-link { display: block; padding: 18px; }
.job-card-top { display: flex; align-items: center; gap: 10px; }
.job-title { font-size: 1.1rem; margin: 0; color: var(--primary-dark); }
.job-company { color: var(--text); margin-top: 2px; }
.job-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.job-salary { font-weight: 600; color: var(--green); }
.dot { color: var(--muted); }
.job-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag {
  background: var(--accent);
  color: var(--primary-dark);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
}
.tag-wfh { background: #e6f6ee; color: var(--green); }
.job-posted { margin-top: 10px; }

.badge { font-size: 0.7rem; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.badge-new { background: var(--green); color: #fff; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; align-items: center; }
.page-link {
  min-width: 38px;
  text-align: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 500;
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-ellipsis { color: var(--muted); }

/* Job detail */
.job-detail { padding-bottom: 40px; }
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.detail-header { display: flex; justify-content: space-between; gap: 16px; }
.detail-title { font-size: 1.5rem; margin: 0 0 6px; }
.detail-salary { font-weight: 700; color: var(--green); font-size: 1.1rem; margin-bottom: 6px; }
.detail-company { font-weight: 600; }
.detail-logo { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; flex-shrink: 0; }
.detail-tags { margin-bottom: 16px; }
.card-heading { font-size: 1.15rem; margin: 0 0 14px; }

.highlights { margin: 0; padding-left: 18px; }
.highlights li { margin-bottom: 6px; }

.prose { white-space: pre-line; }
.prose + .prose { margin-top: 12px; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 0; }
.detail-item dt { font-size: 0.8rem; color: var(--muted); }
.detail-item dd { margin: 2px 0 0; font-weight: 500; }

.note { margin-top: 12px; }

/* FAQs */
.faqs { display: grid; gap: 10px; }
.faq { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq-answer { margin-top: 8px; color: var(--text); }

.back-link { color: var(--primary); font-weight: 500; }

/* Error */
.error-box { text-align: center; padding: 80px 0; }
.error-code { font-size: 4rem; margin: 0; color: var(--primary); }
.error-message { color: var(--muted); margin: 8px 0 24px; }
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
}
.btn:hover { background: var(--primary-dark); }

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 24px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer p { margin: 4px 0; }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.5rem; }
  .detail-header { flex-direction: column-reverse; align-items: flex-start; }
  .header-nav a { margin-left: 12px; font-size: 0.9rem; }
}
