/* inrayjobs — clean white, one restrained accent, borders + shadows, no tints. */
:root {
  --ink: #0f172a;
  --muted: #475569;
  --line: #e5e7eb;
  --accent: #0038ff;
  --accent-dark: #0029c2;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, 0.1), 0 12px 32px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
h1 { font-size: 2.4rem; line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 1.6rem; margin: 0 0 8px; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; margin: 0; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 1.35rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.logo:hover { text-decoration: none; }
.logo-accent { color: var(--accent); }
.main-nav a { color: var(--muted); margin-left: 24px; font-weight: 500; }
.main-nav a:hover { color: var(--ink); }

/* Buttons */
.btn { display: inline-block; padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; border: 1px solid transparent; cursor: pointer; background: #fff; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-text { color: var(--muted); }
.btn-large { padding: 13px 28px; font-size: 1.05rem; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin: 0 0 10px; }
.hero-sub { color: var(--muted); font-size: 1.1rem; margin: 0 0 24px; }
.hero-media { position: relative; }
.hero-media img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: block; }
.hero-stat-card { position: absolute; left: 16px; bottom: -18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 12px 16px; font-size: 0.95rem; color: var(--muted); }
.hero-stat-card strong { color: var(--ink); }

.search-form { display: flex; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: var(--shadow); }
.search-form input { flex: 1; border: 0; outline: 0; padding: 10px 12px; font-size: 1rem; min-width: 0; }
.search-form input + input { border-left: 1px solid var(--line); }
.popular { color: var(--muted); font-size: 0.9rem; margin: 14px 0 0; }
.popular a { margin-right: 12px; }

/* Stats */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 20px 12px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { display: block; font-size: 1.6rem; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 0.9rem; }

/* Sections */
.section { padding: 48px 0; }
.section-alt { background: #fafafa; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-sub { color: var(--muted); margin: 0 0 24px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }

/* Category cards */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Browse by city (issue #10): plain white chips with live counts. */
.city-list { display: flex; flex-wrap: wrap; gap: 10px; }
.city-link { display: inline-flex; gap: 8px; align-items: baseline; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; background: #fff; box-shadow: var(--shadow); color: var(--ink); font-weight: 600; }
.city-link:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.city-count { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.category-card { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); color: var(--ink); }
.category-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.category-card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.category-body { padding: 16px; }
.category-body p { color: var(--muted); margin: 4px 0 10px; font-size: 0.92rem; }
.category-count { font-weight: 600; color: var(--accent); font-size: 0.9rem; }

/* Job cards */
.job-list { display: grid; gap: 12px; }
.job-card { display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); padding: 18px; }
.job-avatar { flex: 0 0 48px; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; color: var(--ink); background: #fff; }
.job-main { flex: 1; min-width: 0; }
.job-title { margin: 0 0 2px; }
.job-title a { color: var(--ink); }
.job-title a:hover { color: var(--accent); }
.job-meta { color: var(--muted); margin: 0 0 8px; }
.job-tags { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 0.82rem; color: var(--muted); }
.posted { color: var(--muted); font-size: 0.85rem; }
.job-apply { flex: 0 0 auto; }
.job-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex: 0 0 auto; }

/* Save / unsave toggle (issue #6) */
.save-form { display: inline; }
.btn-save { border-color: var(--line); color: var(--ink); }
.btn-save:hover { border-color: var(--accent); color: var(--accent); }
.btn-save.is-saved { background: var(--accent); border-color: var(--accent); color: #fff; }
.apply-box .save-form { margin-left: auto; }

/* Empty state */
.empty-state { border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px 24px; text-align: center; }
.empty-state p { color: var(--muted); margin: 8px 0 0; }

/* How it works */
.how-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.how-image { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: block; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; box-shadow: var(--shadow); background: #fff; }
.steps strong { display: block; font-size: 1.05rem; }
.steps span { color: var(--muted); }

/* Search page */
.search-form-page { margin-bottom: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 24px; }
.filters label { font-size: 0.85rem; color: var(--muted); display: grid; gap: 4px; }
.filters select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 0.95rem; background: #fff; min-width: 160px; }
.results-heading { font-size: 1.4rem; margin: 0 0 16px; }
.pagination { display: flex; align-items: center; gap: 16px; margin-top: 24px; }
.page-info { color: var(--muted); }

/* Detail page */
.detail-grid { display: grid; grid-template-columns: 1.6fr 0.8fr; gap: 40px; align-items: start; }
.breadcrumb { color: var(--muted); font-size: 0.9rem; margin: 0 0 16px; }
.job-meta-large { color: var(--muted); font-size: 1.05rem; margin: 0 0 12px; }
.apply-box { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin: 24px 0; display: flex; gap: 20px; align-items: center; }
.apply-note { color: var(--muted); margin: 0; font-size: 0.92rem; }
.job-description { margin: 0 0 28px; }
.job-description ul { padding-left: 20px; }
.job-facts { border-top: 1px solid var(--line); margin: 0; }
.job-facts div { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.job-facts dt { flex: 0 0 140px; color: var(--muted); }
.job-facts dd { margin: 0; }
.side-card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.side-card h3 { margin-bottom: 8px; }
.side-card p { color: var(--muted); margin: 0 0 16px; }
.similar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.similar-list li a { display: block; font-weight: 600; color: var(--ink); }
.similar-list li span { color: var(--muted); font-size: 0.88rem; }

/* Auth */
.nav-cta { border: 1px solid var(--accent); border-radius: 8px; padding: 6px 12px; color: var(--accent) !important; }
.nav-cta:hover { background: var(--accent); color: #fff !important; text-decoration: none; }
.narrow { max-width: 640px; }
.messages { margin-top: 16px; display: grid; gap: 8px; }
.message { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; box-shadow: var(--shadow); background: #fff; }
.message-success { border-color: #16a34a; }
.message-warning { border-color: #d97706; }
.message-error { border-color: #dc2626; }
.message-info { border-color: var(--accent); }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0; }
.choice-card { display: block; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; color: var(--ink); }
.choice-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.choice-card h2 { margin-bottom: 8px; }
.choice-card p { color: var(--muted); margin: 0 0 20px; }
.form-card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; display: grid; gap: 16px; margin: 24px 0; }
.form-field { display: grid; gap: 6px; }
.form-field label { font-weight: 600; font-size: 0.95rem; }
.form-field input, .form-field select, .form-field textarea { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 1rem; width: 100%; background: #fff; font-family: inherit; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form-field textarea { resize: vertical; }
.chip-native { border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* Application status — restrained: one colour per state, same chip shape. */
.status-chip { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 0.82rem; font-weight: 600; }
.status-applied { border-color: var(--accent); color: var(--accent); }
.status-viewed { color: var(--muted); }
.status-shortlisted { border-color: #15803d; color: #15803d; }
.status-rejected { border-color: #b91c1c; color: #b91c1c; }
.posted-list { display: grid; gap: 16px; margin: 20px 0; }
.posted-job { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; }
.posted-job h3 { margin-bottom: 4px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; }
.checkbox-row input { width: auto; margin-top: 4px; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.help-text { color: var(--muted); font-size: 0.85rem; margin: 0; }
.form-errors, .field-errors { color: #dc2626; font-size: 0.9rem; }
.form-errors ul, .field-errors ul { margin: 0; padding-left: 18px; }
.auth-alt { color: var(--muted); margin: 12px 0 0; }
.notice { border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin: 24px 0; box-shadow: var(--shadow); }
.notice-warning { border-color: #d97706; }
.notice-ok { border-color: #16a34a; }
.inline-form { display: inline; margin-left: 8px; }
.dashboard-actions { margin-top: 28px; display: grid; gap: 12px; justify-items: start; }

@media (max-width: 860px) {
  .choice-grid { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.footer-note { color: var(--muted); font-size: 0.9rem; max-width: 520px; margin: 8px 0 0; }
.footer-nav a { color: var(--muted); margin-left: 24px; }

/* Resume builder (issue #9): one bordered card per work/education entry. */
.entry-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 0 0 12px; background: #fff; }
.entry-card h3 { margin: 0 0 4px; font-size: 1rem; }
.entry-card .job-meta { margin: 0 0 8px; }
.entry-card .job-description { margin: 0; }

/* AI job matching (issue #11): score badge + explained reasons. The
   score is a plain number with the reasons listed — never a black box. */
.match-section { margin-top: 32px; }
.match-card { display: grid; gap: 10px; }
.match-line { margin: 0; }
.match-badge { display: inline-block; background: var(--accent); color: #fff; font-weight: 700; font-size: 0.85rem; border-radius: 999px; padding: 3px 12px; }
.match-reasons { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 0.9rem; color: var(--muted); }
.match-reasons li::before { content: "✓ "; color: #16a34a; font-weight: 700; }

@media (max-width: 860px) {
  h1 { font-size: 1.9rem; }
  .hero-grid, .how-grid, .detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .search-form { flex-direction: column; }
  .search-form input + input { border-left: 0; border-top: 1px solid var(--line); }
  .job-card { flex-wrap: wrap; }
  .job-apply { width: 100%; text-align: center; }
  .apply-box { flex-direction: column; align-items: stretch; }
  .main-nav a { margin-left: 16px; }
}

@media (max-width: 520px) {
  .category-grid { grid-template-columns: 1fr; }
}

/* Company pages */
.company-head { display: flex; gap: 20px; align-items: center; margin-bottom: 24px; }
.company-head h1 { margin-bottom: 4px; }
.company-logo { width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 8px; flex-shrink: 0; }
