/* ===================================================================
   Workly — Modern Design System v2.0
   Lightweight, responsive, premium dark-first design
=================================================================== */

/* === Fonts === */
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:400;font-display:optional;src:url('../fonts/plus-jakarta-sans-400-latin.woff2')format('woff2')}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:600;font-display:optional;src:url('../fonts/plus-jakarta-sans-600-latin.woff2')format('woff2')}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:800;font-display:optional;src:url('../fonts/plus-jakarta-sans-800-latin.woff2')format('woff2')}

/* === Design Tokens === */
:root {
  /* Layout */
  --gap: 24px;
  --nav-width: 1080px;
  --main-width: 840px;
  --header-height: 60px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Dark theme colors */
  --bg: #0a0c10;
  --surface: #111318;
  --surface-2: #181c24;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --text-primary: #f1f5f9;
  --text-secondary: #8b95a9;
  --text-muted: #4a5568;
  --accent: #10b981;
  --accent-light: #34d399;
  --accent-dim: rgba(16,185,129,0.12);
  --accent-border: rgba(16,185,129,0.28);
  --salary-color: #34d399;
  --salary-bg: rgba(52,211,153,0.1);
  --salary-border: rgba(52,211,153,0.22);
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --amber: #f59e0b;
  --red: #ef4444;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
  --shadow-hover: 0 16px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(16,185,129,0.3);
  --glow: 0 0 20px rgba(16,185,129,0.25);
}

/* === Light Mode === */
body.light {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f0f4f8;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent: #047857;
  --accent-light: #059669;
  --accent-dim: #ecfdf5;
  --accent-border: #a7f3d0;
  --salary-color: #065f46;
  --salary-bg: #ecfdf5;
  --salary-border: #a7f3d0;
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06);
  --shadow: 0 2px 12px rgba(15,23,42,0.08);
  --shadow-lg: 0 8px 24px rgba(15,23,42,0.1);
  --shadow-hover: 0 12px 32px rgba(15,23,42,0.12), 0 0 0 1px rgba(5,150,105,0.25);
  --glow: 0 0 20px rgba(5,150,105,0.15);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: -0.012em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-light); }
img { max-width: 100%; height: auto; display: block; }
p { margin-bottom: 1.15rem; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: .3rem; }
h1,h2,h3,h4,h5,h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

/* === Layout === */
.main { flex: 1; padding: var(--gap) 0 calc(var(--gap) * 2); }
.container { max-width: var(--main-width); margin: 0 auto; padding: 0 var(--gap); width: 100%; }
.container-wide { max-width: var(--nav-width); margin: 0 auto; padding: 0 var(--gap); width: 100%; }

/* ===================================================================
   HEADER / NAVIGATION
=================================================================== */
.header {
  background: rgba(10,12,16,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
body.light .header { background: rgba(245,247,250,0.9); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  max-width: var(--nav-width);
  margin: 0 auto;
  padding: 0 var(--gap);
  gap: 1rem;
}

/* Logo */
.logo a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}
.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg,#1a1d26,#0d0f14);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35), 0 0 12px rgba(16,185,129,0.15);
  transition: transform .2s, box-shadow .2s;
  flex-shrink: 0;
}
body.light .brand-icon {
  background: #fff;
  border-color: rgba(16,185,129,0.2);
  box-shadow: 0 2px 8px rgba(16,185,129,0.12);
}
.logo a:hover .brand-icon { transform: translateY(-1px) scale(1.05); box-shadow: 0 6px 16px rgba(16,185,129,0.3); }
.brand-name { display: inline-flex; align-items: baseline; }
.brand-name-work { color: var(--text-primary); }
.brand-name-ly {
  background: linear-gradient(135deg,#34d399,#10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-dot { color: #34d399; -webkit-text-fill-color: #34d399; }

/* Nav menu */
.nav-right { display: flex; align-items: center; gap: 0.5rem; }
#menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
}
#menu li a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all .15s;
  white-space: nowrap;
}
#menu li a:hover { color: var(--text-primary); background: var(--surface-2); }
#menu li a.active { color: var(--text-primary); background: var(--surface-2); font-weight: 600; }

/* Resources dropdown */
.nav-resources-item { position: relative; }
.nav-resources-toggle { cursor: pointer; }
.nav-resources-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 210px;
  padding: 0.4rem;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  list-style: none;
}
.nav-resources-dropdown li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  transition: background .12s;
  white-space: nowrap;
}
.nav-resources-dropdown li a:hover { background: var(--surface-2); color: var(--accent); }
.nav-resources-item:hover .nav-resources-dropdown,
.nav-resources-item:focus-within .nav-resources-dropdown { display: block; }

/* Theme toggle */
.logo-switches { display: flex; align-items: center; }
#theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 7px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s, transform .2s;
}
#theme-toggle:hover { color: var(--text-primary); background: var(--surface-2); transform: rotate(12deg); }

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.nav-hamburger:hover { color: var(--text-primary); background: var(--surface-2); }
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem var(--gap);
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: all .15s;
}
.mobile-nav a:hover { color: var(--text-primary); background: var(--surface-2); }
.mobile-nav a.active { color: var(--accent); background: var(--accent-dim); font-weight: 600; }
.mobile-nav-divider { height: 1px; background: var(--border); margin: 0.5rem 0; }

/* ===================================================================
   HOMEPAGE HERO
=================================================================== */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1rem 2rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}
body.light .hero-badge {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.hero-badge-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: badgePulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
body.light .hero-badge-pulse {
  background: #047857;
}
@keyframes badgePulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(0.8); }
}
.hero-title-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1rem;
}
.hero-brand-title {
  font-size: clamp(2.8rem, 6vw, 4rem);
  font-weight: 850;
  margin: 0;
  letter-spacing: -0.05em;
  line-height: 1;
}
.hero-brand-title .brand-title-work {
  background: linear-gradient(180deg,#fff 30%,#94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.light .hero-brand-title .brand-title-work {
  background: linear-gradient(180deg,#0f172a 25%,#334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-brand-title .brand-title-ly {
  background: linear-gradient(135deg,#34d399,#10b981,#059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-brand-title .logo-dot { color: #34d399; -webkit-text-fill-color: #34d399; }
.hero-pro-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 0.675rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  align-self: center;
  transform: translateY(-6px);
}
body.light .hero-pro-chip {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.hero-lead-h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  letter-spacing: -0.025em;
  line-height: 1.35;
  max-width: 660px;
}
.lead-highlight {
  background: linear-gradient(135deg,#38bdf8,#34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}
body.light .lead-highlight {
  background: linear-gradient(135deg,#0284c7,#059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.profile .subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}
.profile-buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.75rem;
}

/* ===================================================================
   BUTTONS & PILLS
=================================================================== */
.button-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all .2s;
  text-decoration: none !important;
  white-space: nowrap;
}
.button-link:hover { color: var(--text-primary); background: var(--surface-2); border-color: var(--border-hover); transform: translateY(-1px); }
.button-link.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #022216 !important;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(16,185,129,0.28);
}
body.light .button-link { color: #334155; background: #ffffff; border-color: #e2e8f0; }
body.light .button-link.active {
  background: #065f46 !important;
  border-color: #065f46 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(6,95,70,0.25);
}

.btn-papermod-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: linear-gradient(135deg,#10b981,#059669);
  color: #fff !important;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius);
  border: 1px solid #10b981;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16,185,129,0.28);
  transition: transform .15s, box-shadow .15s;
  text-decoration: none !important;
}
.btn-papermod-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(16,185,129,0.42); color: #fff !important; }
.btn-papermod-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--surface);
  color: var(--text-primary) !important;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none !important;
}
.btn-papermod-secondary:hover { border-color: var(--border-hover); background: var(--surface-2); transform: translateY(-1px); color: var(--text-primary) !important; }

/* ===================================================================
   SEARCH BOX
=================================================================== */
.searchbox { width: 100%; max-width: 640px; margin: 0 auto 1.25rem; }
.searchbox form {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px 8px 6px 16px;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}
.searchbox form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim), var(--shadow);
}
.searchbox-input-wrap { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.searchbox input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.925rem;
  padding: 8px 4px;
  outline: none;
  font-family: inherit;
  font-weight: 500;
}
.searchbox input[type="text"]::placeholder { color: var(--text-secondary); opacity: .8; }
.searchbox-controls { display: flex; align-items: center; gap: 8px; }
.searchbox select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
  font-family: inherit;
}
.searchbox select:focus { border-color: var(--accent); }
.searchbox button {
  background: linear-gradient(135deg,#10b981,#059669);
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(16,185,129,0.22);
  transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
  font-family: inherit;
}
.searchbox button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16,185,129,0.38); }

/* ===================================================================
   JOB CARDS / POST ENTRIES
=================================================================== */
.posts-list { display: flex; flex-direction: column; gap: 14px; }
.post-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: block;
  position: relative;
}
.post-entry:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-border);
}
.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.65rem;
}
.entry-header h2 { font-size: 1.2rem; font-weight: 700; margin: 0; line-height: 1.35; letter-spacing: -0.02em; }
.entry-header h2 a { color: var(--text-primary); }
.entry-header h2 a:hover { color: var(--accent); }
.entry-salary {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--salary-color);
  white-space: nowrap;
  background: var(--salary-bg);
  padding: 4px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--salary-border);
  display: inline-flex;
  align-items: center;
  font-feature-settings: 'tnum';
  flex-shrink: 0;
}
.entry-subhead {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}
.entry-company-avatar {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.entry-company { font-weight: 600; color: var(--text-primary); }
.entry-company:hover { color: var(--accent); }
.dot-sep { color: var(--text-muted); opacity: .7; }
body.light .dot-sep { color: #64748b; opacity: 1; }
.entry-content { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; margin-bottom: 1rem; }
body.light .entry-content { color: #334155; }
.entry-footer { display: flex; align-items: center; gap: 7px; font-size: 0.76rem; color: var(--text-secondary); flex-wrap: wrap; }
body.light .entry-footer { color: #475569; }

/* Badges */
.badge-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.71rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  white-space: nowrap;
}
body.light .badge-tag {
  color: #334155;
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.badge-tag.badge-verified {
  color: var(--accent-light);
  border-color: var(--accent-border);
  background: var(--accent-dim);
}
body.light .badge-tag.badge-verified {
  color: #065f46;
  border-color: #a7f3d0;
  background: #ecfdf5;
}
.badge-tag.badge-region {
  color: #c084fc;
  border-color: rgba(168,85,247,0.25);
  background: rgba(168,85,247,0.08);
}
body.light .badge-tag.badge-region {
  color: #581c87;
  border-color: #ddd6fe;
  background: #f5f3ff;
}
.badge-tag.badge-remote {
  color: #34d399;
  border-color: rgba(52,211,153,0.3);
  background: rgba(52,211,153,0.1);
}
body.light .badge-tag.badge-remote {
  color: #065f46;
  border-color: #a7f3d0;
  background: #ecfdf5;
  font-weight: 600;
}

/* ===================================================================
   SECTION HEAD
=================================================================== */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 2.5rem 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.section-head h2 { font-size: 1.15rem; font-weight: 700; margin: 0; color: var(--text-primary); }
.section-head a { font-size: 0.84rem; color: var(--text-secondary); font-weight: 500; }
.section-head a:hover { color: var(--accent); }

/* ===================================================================
   HUB TILES (Browse by Location/Category)
=================================================================== */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.hub-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .18s;
  text-decoration: none !important;
  overflow: hidden;
}
.hub-tile:hover {
  border-color: var(--accent-border);
  background: var(--surface-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.hub-tile-flag { font-size: 1.2rem; flex-shrink: 0; line-height: 1; }
.hub-tile-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ===================================================================
   FILTER BAR
=================================================================== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; align-items: center; }
.filter-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s;
  cursor: pointer;
}
.filter-pill:hover { background: var(--surface-2); border-color: var(--border-hover); color: var(--text-primary); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
body.light .filter-pill { color: #334155; background: #ffffff; border-color: #cbd5e1; }
body.light .filter-pill.active { background: #065f46; border-color: #065f46; color: #fff !important; }
.filter-pill-clear { background: rgba(220,38,38,0.1); border-color: rgba(220,38,38,0.3); color: #fca5a5; }
body.light .filter-pill-clear { color: #991b1b; }
.filter-pill-clear:hover { background: rgba(220,38,38,0.18); }

/* ===================================================================
   PAGINATION
=================================================================== */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}
.pagination a {
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all .15s;
  font-weight: 600;
}
.pagination a:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--surface-2); }
.pagination-info { color: var(--text-secondary); font-size: 0.84rem; }

/* ===================================================================
   BREADCRUMBS
=================================================================== */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--text-primary); }
.breadcrumbs .sep { opacity: .4; }
.breadcrumbs .current { color: var(--text-primary); font-weight: 500; }

/* ===================================================================
   POST / JOB DETAIL
=================================================================== */
.post-single { max-width: var(--main-width); margin: 0 auto; }
.post-header { margin-bottom: 2rem; }
.post-title { font-size: 2rem; font-weight: 800; color: var(--text-primary); line-height: 1.25; margin-bottom: 0.75rem; letter-spacing: -0.03em; }
.post-meta { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 0.875rem; flex-wrap: wrap; margin-bottom: 1rem; }
.post-meta a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 3px; }
.post-actions { display: flex; gap: 1rem; align-items: center; margin: 2rem 0; flex-wrap: wrap; }
.post-content { color: var(--text-secondary); font-size: 1rem; line-height: 1.7; }
.post-content h2 { font-size: 1.45rem; margin-top: 2rem; margin-bottom: 0.9rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); color: var(--text-primary); }
.post-content h3 { font-size: 1.2rem; margin-top: 1.65rem; margin-bottom: 0.65rem; color: var(--text-primary); }
.post-content strong { color: var(--text-primary); }
.post-content p a, .post-content li a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

/* Callout */
.papermod-callout {
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}
.papermod-callout-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 8px; line-height: 1.4; }
.papermod-callout-desc { color: var(--text-secondary); font-size: 0.9rem; margin: 0; line-height: 1.5; }

/* Job specs */
.job-specs-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
}
.job-specs-head { font-size: 0.92rem; font-weight: 700; color: var(--text-primary); margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.job-specs-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.75rem 1.5rem; }
.job-spec-row { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 0.4rem; border-bottom: 1px dashed var(--border); font-size: 0.875rem; gap: 1rem; }
.spec-k { color: var(--text-secondary); font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.spec-v { color: var(--text-primary); font-weight: 600; text-align: right; word-break: break-word; }

/* Job overview expand */
.job-overview-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem 2rem 2rem; margin: 2rem 0; box-shadow: var(--shadow); }
body.light .job-overview-card { background: #fff; border-color: #e2e8f0; }
.job-overview-head { display: flex; align-items: center; gap: 12px; margin-bottom: 1.35rem; }
.job-overview-icon { font-size: 1.4rem; flex-shrink: 0; }
.job-overview-title { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); margin: 0; letter-spacing: -0.025em; }
.job-overview-content { position: relative; max-height: 380px; overflow: hidden; transition: max-height .4s cubic-bezier(0.16,1,0.3,1); }
.job-overview-content.is-expanded { max-height: none; }
.job-overview-fade { position: absolute; bottom: 0; left: 0; right: 0; height: 140px; pointer-events: none; background: linear-gradient(to bottom,rgba(17,19,24,0),rgba(17,19,24,1)); }
body.light .job-overview-fade { background: linear-gradient(to bottom,rgba(255,255,255,0),rgba(255,255,255,1)); }
.job-overview-content.is-expanded .job-overview-fade { display: none; }
.job-overview-actions { display: flex; justify-content: center; margin-top: -20px; position: relative; z-index: 10; }
.job-overview-content.is-expanded + .job-overview-actions { margin-top: 1.5rem; }
.btn-job-expand { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); color: var(--text-primary); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 9px 22px; font-size: 0.875rem; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); transition: all .2s; font-family: inherit; }
.btn-job-expand:hover { border-color: var(--border-hover); background: var(--surface-2); transform: translateY(-1px); }
.job-expand-arrow { font-size: 0.7rem; transition: transform .25s; }

/* Job article body */
.job-article-body h3, .job-article-body h4 { position: relative; font-size: 1.15rem; font-weight: 750; color: var(--text-primary); margin: 1.65rem 0 0.8rem; padding-left: 14px; line-height: 1.4; }
.job-article-body h3::before, .job-article-body h4::before { content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; background: linear-gradient(180deg,#6366f1,#4f46e5); border-radius: 3px; }
.job-article-body p { line-height: 1.7; color: var(--text-secondary); margin-bottom: 1.1rem; }
.job-article-body ul { padding-left: 1.4rem; margin: 0.5rem 0 1.2rem; }
.job-article-body ul li { margin-bottom: 0.45rem; line-height: 1.65; color: var(--text-secondary); }

/* Trust badges */
.trust-badge-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  margin: 10px 0 16px;
}
.trust-badge-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.trust-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-pill); border: 1px solid transparent; white-space: nowrap; }
.trust-pill.trust-fresh { background: rgba(16,185,129,0.15); color: #34d399; border-color: rgba(16,185,129,0.3); }
body.light .trust-pill.trust-fresh { color: #065f46; }
.trust-pill.trust-verified { background: rgba(59,130,246,0.15); color: #93c5fd; border-color: rgba(59,130,246,0.3); }
body.light .trust-pill.trust-verified { color: #1d4ed8; }
.trust-pill.trust-region { background: rgba(168,85,247,0.15); color: #d8b4fe; border-color: rgba(168,85,247,0.3); }
body.light .trust-pill.trust-region { color: #6d28d9; }
.trust-pill.trust-deadline { background: rgba(245,158,11,0.15); color: #fcd34d; border-color: rgba(245,158,11,0.3); }
body.light .trust-pill.trust-deadline { color: #92400e; }
.trust-badge-meta { font-size: 0.71rem; color: var(--text-secondary); }

/* Salary benchmark */
.salary-benchmark-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin: 1rem 0; }
.salary-benchmark-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: .5rem; }
.salary-benchmark-title { font-weight: 700; font-size: .92rem; color: var(--text-primary); }
.salary-benchmark-tag { font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: 12px; }
.tag-above { background: var(--accent-dim); color: #34d399; border: 1px solid var(--accent-border); }
.tag-below { background: rgba(239,68,68,.12); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
body.light .tag-above { color: #065f46; }
body.light .tag-below { color: #b91c1c; }
.salary-meter-track { height: 8px; background: var(--border); border-radius: 4px; margin-bottom: 0.4rem; }
.salary-meter-fill { height: 100%; background: linear-gradient(90deg,#3b82f6,#10b981); border-radius: 4px; }
.salary-meter-labels { display: flex; justify-content: space-between; font-size: .73rem; color: var(--text-secondary); }

/* Expired banner */
.expired-banner--closed { background: rgba(220,38,38,0.08); border: 1px solid rgba(220,38,38,0.25); border-radius: var(--radius); padding: 1.25rem; margin: 1.5rem 0; }
.expired-banner-inner { display: flex; gap: 1rem; align-items: flex-start; }
.expired-banner-icon { font-size: 1.75rem; flex-shrink: 0; }
.expired-banner-title { margin: 0 0 .35rem; font-size: 1rem; font-weight: 700; color: #fca5a5; }
body.light .expired-banner-title { color: #991b1b; }
.expired-banner-body { margin: 0; color: var(--text-secondary); font-size: .875rem; line-height: 1.5; }

/* Skills matrix */
.skills-matrix-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid #3b82f6; border-radius: var(--radius); padding: 1.15rem; margin: 1rem 0; }
.skills-matrix-header { display: flex; align-items: center; gap: 10px; margin-bottom: .85rem; }
.skills-matrix-icon { font-size: 1.4rem; flex-shrink: 0; }
.skills-matrix-title { margin: 0; font-size: .92rem; font-weight: 700; color: var(--text-primary); }
.skills-matrix-subtitle { font-size: .74rem; color: var(--text-secondary); }
.skills-matrix-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: .85rem; }
.skills-matrix-col { display: flex; flex-direction: column; gap: 5px; }
.skills-col-label { font-size: .71rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); }
.skills-tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.skill-tag { display: inline-block; padding: 2px 8px; font-size: .77rem; font-weight: 600; border-radius: 5px; background: rgba(59,130,246,.1); color: #93c5fd; border: 1px solid rgba(59,130,246,.22); }
body.light .skill-tag { color: #1d4ed8; background: rgba(37,99,235,.08); border-color: rgba(37,99,235,.18); }

/* Role silo */
.role-silo-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin: 2rem 0; }
.role-silo-header { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--text-primary); margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: .65rem; }
.role-silo-icon { font-size: 1.3rem; }
.role-silo-links { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: .75rem; }
.role-silo-link { display: flex; flex-direction: column; gap: 3px; padding: .75rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); text-decoration: none !important; transition: border-color .15s, background .15s; }
.role-silo-link:hover { border-color: var(--accent-border); }
.silo-link-title { font-size: .85rem; font-weight: 700; color: var(--text-primary); }
.silo-link-desc { font-size: .75rem; color: var(--text-secondary); line-height: 1.35; }

/* Calc widget */
.calc-widget-link { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: .875rem 1rem; margin: 1rem 0; flex-wrap: wrap; }
.calc-widget-icon { font-size: 1.6rem; flex-shrink: 0; }
.calc-widget-body { flex: 1; min-width: 160px; }
.calc-widget-body strong { display: block; font-size: .9rem; margin-bottom: .2rem; color: var(--text-primary); }
.calc-widget-body span { font-size: .82rem; color: var(--text-secondary); }
.calc-widget-btn { flex-shrink: 0; }

/* Visa signal card */
.visa-signal-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 1.15rem; margin: 1rem 0; }
body.light .visa-signal-card { background: #ffffff; border-color: #e2e8f0; border-left-color: #059669; }
.visa-signal-header { display: flex; align-items: center; gap: 10px; margin-bottom: .6rem; }
.visa-signal-icon { font-size: 1.4rem; flex-shrink: 0; }
.visa-signal-title { color: var(--text-primary); font-size: .95rem; font-weight: 700; }
body.light .visa-signal-title { color: #0f172a; }
.visa-signal-badge { display: inline-block; margin-left: .5rem; font-size: .74rem; font-weight: 700; padding: .15rem .5rem; border-radius: 10px; }
.visa-rating-high { background: var(--accent-dim); color: #34d399; border: 1px solid var(--accent-border); }
body.light .visa-rating-high { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.visa-rating-standard { background: rgba(251,191,36,.12); color: #fcd34d; border: 1px solid rgba(251,191,36,.3); }
body.light .visa-rating-standard { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.visa-signal-desc { margin: 0 0 .5rem; font-size: .875rem; color: #cbd5e1; line-height: 1.55; }
body.light .visa-signal-desc { color: #1e293b; }
.visa-signal-link { display: inline-block; font-size: .84rem; color: #34d399; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
body.light .visa-signal-link { color: #065f46; }
.visa-signal-link:hover { color: #6ee7b7; text-decoration: underline; }
body.light .visa-signal-link:hover { color: #047857; text-decoration: underline; }

/* ===================================================================
   FOOTER
=================================================================== */
.footer {
  padding: calc(var(--gap) * 1.5) var(--gap);
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  text-align: center;
  line-height: 1.8;
}
.footer a, .footer-btn-link {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.footer a:hover, .footer-btn-link:hover { color: var(--text-primary); }
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
  list-style: none;
  padding: 0;
  flex-wrap: wrap;
}

/* ===================================================================
   MODAL
=================================================================== */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
}
.modal-card h3 { margin-bottom: 0.5rem; font-size: 1.2rem; color: var(--text-primary); }
.modal-card p { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 1.25rem; }
.modal-card textarea {
  width: 100%;
  height: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px;
  font-family: inherit;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  outline: none;
  resize: vertical;
}
.modal-card textarea:focus { border-color: var(--accent); }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.75rem; }
.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all .15s;
}
.modal-close-btn:hover { background: var(--border); color: var(--text-primary); }

/* Report form */
.report-type-fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem 1rem; margin-bottom: 0.75rem; }
.report-type-fieldset legend { font-size: .84rem; color: var(--text-secondary); padding: 0 0.4rem; font-weight: 600; }
.report-type-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); gap: 0.5rem; margin-top: 0.5rem; }
.report-type-option { display: flex; align-items: center; gap: .4rem; cursor: pointer; padding: .4rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); transition: border-color .15s, background .15s; font-size: .84rem; color: var(--text-primary); }
.report-type-option:hover { border-color: var(--accent); background: var(--accent-dim); }
.report-type-option input[type="radio"] { accent-color: var(--accent); }
.report-type-option:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.report-type-option input[type="radio"]:checked + .report-type-label { color: var(--accent); font-weight: 600; }

/* Apply modal */
.apply-modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.65); backdrop-filter: blur(6px); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; }
.apply-modal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); max-width: 480px; width: 100%; padding: 1.5rem 1.75rem; box-shadow: var(--shadow-lg); position: relative; max-height: 92vh; overflow-y: auto; }
body.light .apply-modal-card { background: #fff; border-color: #e2e8f0; }
.apply-close-btn { position: absolute; top: 1.25rem; right: 1.25rem; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; font-size: 1rem; }
.apply-close-btn:hover { background: var(--surface-2); color: var(--text-primary); transform: rotate(90deg); }
.apply-modal-header { margin-bottom: 1.15rem; padding-right: 2.5rem; }
.apply-modal-badge { font-size: .84rem; color: var(--text-secondary); display: block; margin-bottom: .25rem; }
.apply-modal-title { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); margin: 0 0 .25rem; line-height: 1.3; }
.apply-modal-company { font-size: .9rem; font-weight: 600; color: #3b82f6; }
.apply-form-group { margin-bottom: .9rem; }
.apply-label { display: block; font-size: .84rem; font-weight: 700; color: var(--text-primary); margin-bottom: .35rem; }
.apply-input { width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 10px 14px; font-size: .9rem; color: var(--text-primary); background: var(--surface-2); outline: none; font-family: inherit; transition: border-color .15s, box-shadow .15s; }
.apply-input::placeholder { color: var(--text-secondary); opacity: .8; }
.apply-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.18); }
body.light .apply-input { background: #fff; border-color: #e2e8f0; }
.apply-dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 1.1rem 1rem; text-align: center; cursor: pointer; background: var(--surface-2); transition: all .15s; user-select: none; }
.apply-dropzone:hover, .apply-dropzone.drag-over { border-color: #3b82f6; background: rgba(59,130,246,.06); }
.apply-dropzone.has-file { border-color: var(--accent); background: var(--accent-dim); }
.dropzone-paperclip { font-size: 1.6rem; margin-bottom: .3rem; }
.dropzone-text { font-size: .9rem; font-weight: 600; color: var(--text-primary); }
.dropzone-hint { font-size: .76rem; color: var(--text-secondary); margin-top: .2rem; }
.apply-submit-btn { width: 100%; background: linear-gradient(180deg,#0284c7,#0369a1); color: #fff; border: none; border-radius: var(--radius); padding: 13px 20px; font-size: .95rem; font-weight: 700; cursor: pointer; box-shadow: 0 6px 14px rgba(2,132,199,.3); margin-top: .5rem; transition: transform .15s, box-shadow .15s; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; }
.apply-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(2,132,199,.42); }
.apply-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.apply-error-text { color: #fca5a5; font-size: .8rem; margin-bottom: .85rem; padding: 8px 12px; background: rgba(239,68,68,.1); border-radius: var(--radius-sm); border: 1px solid rgba(239,68,68,.2); }
body.light .apply-error-text { color: #991b1b; }
.apply-success-banner { text-align: center; padding: 2rem 1rem; }
.apply-success-banner .success-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin: 0 auto 1rem; }
.apply-success-banner h4 { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); margin-bottom: .5rem; }
.apply-success-banner p { color: var(--text-secondary); font-size: .9rem; line-height: 1.5; }

/* ===================================================================
   AUDIT / VISA / MISC PAGE STYLES
=================================================================== */
.audit-hero { text-align: center; padding: 2.5rem 0 2rem; }
.audit-hero-badge { display: inline-block; background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-border); border-radius: 20px; padding: .3rem 1rem; font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 1rem; }
.audit-hero-title { font-size: 2.1rem; font-weight: 800; margin: 0 0 .75rem; }
.audit-hero-sub { color: var(--text-secondary); max-width: 660px; margin: 0 auto 1.5rem; line-height: 1.65; }
.audit-stats-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 2rem; }
.audit-stat { text-align: center; }
.audit-stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1; }
.audit-stat-label { font-size: .78rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; }
.audit-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; }
.audit-table-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: .5rem; }
.audit-table { width: 100%; }
.audit-table-row { display: grid; grid-template-columns: 2fr 1.5fr 1.5fr 1fr; gap: 1rem; padding: .75rem 1.25rem; border-bottom: 1px solid var(--border); align-items: center; font-size: .875rem; transition: background .12s; }
.audit-table-row:last-child { border-bottom: none; }
.audit-table-row:hover { background: var(--accent-dim); }
.audit-table-head { background: rgba(255,255,255,.02); font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary); }
body.light .audit-table-head { background: rgba(0,0,0,.025); }
.audit-verif-code { font-family: monospace; font-size: .84rem; color: var(--accent); font-weight: 600; }
.audit-filed-date { color: var(--text-secondary); font-size: .82rem; }
.audit-status { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; font-size: .8rem; padding: .22rem .6rem; border-radius: 20px; }
.status-resolved { background: var(--accent-dim); color: #34d399; }
.status-review { background: rgba(251,191,36,.12); color: #fbbf24; }
.status-received { background: rgba(59,130,246,.12); color: #60a5fa; }
body.light .status-resolved { color: #065f46; }
body.light .status-review { color: #92400e; }
body.light .status-received { color: #1e40af; }
.audit-empty { text-align: center; padding: 3rem; color: var(--text-secondary); }
.audit-cta-box { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; margin-bottom: 2rem; }
.audit-cta-box h3 { margin: 0 0 .5rem; font-size: 1.3rem; color: var(--text-primary); }
.audit-cta-box p { color: var(--text-secondary); margin-bottom: 1.25rem; }

/* Visa */
.visa-hero { text-align: center; padding: 2.5rem 0 2rem; }
.visa-hero-flags { font-size: 2.5rem; margin-bottom: .5rem; }
.visa-arrow { display: inline-block; margin: 0 .5rem; }
.visa-hero-title { font-size: 2rem; font-weight: 800; margin: 0 0 .75rem; }
.visa-hero-sub { color: var(--text-secondary); max-width: 600px; margin: 0 auto 1.5rem; line-height: 1.65; }
.visa-tab-nav { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }
.visa-tab { padding: .6rem 1.5rem; border: 2px solid var(--border); border-radius: 30px; background: transparent; color: var(--text-primary); font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .2s; font-family: inherit; }
.visa-tab:hover { border-color: var(--accent); color: var(--accent); }
.visa-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.visa-alert { padding: 1rem 1.25rem; border-radius: var(--radius); margin: 1.5rem 0; font-size: .9rem; line-height: 1.6; }
.visa-alert-info { background: rgba(59,130,246,.08); border-left: 3px solid #3b82f6; color: var(--text-secondary); }
.visa-alert-warning { background: rgba(251,191,36,.08); border-left: 3px solid #f59e0b; color: var(--text-secondary); }
.visa-req-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 1rem; margin: 1rem 0; }
.visa-req-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.visa-req-card h3 { margin: .5rem 0 .3rem; font-size: 1rem; color: var(--text-primary); }
.visa-req-card p { color: var(--text-secondary); font-size: .875rem; margin: 0; line-height: 1.55; }
.visa-req-icon { font-size: 1.6rem; }
.visa-table-wrap { overflow-x: auto; margin: 1rem 0; }
.visa-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.visa-table th,.visa-table td { padding: .6rem .875rem; text-align: left; border-bottom: 1px solid var(--border); }
.visa-table th { background: var(--surface); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); }
.visa-table tr:hover td { background: var(--accent-dim); }
.visa-timeline { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0; }
.visa-step { display: flex; gap: 1rem; align-items: flex-start; }
.visa-step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #022216; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; flex-shrink: 0; }
.visa-cost-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(155px,1fr)); gap: .75rem; margin: 1rem 0; }
.visa-cost-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .875rem; text-align: center; }
.visa-cost-item span { display: block; font-size: .77rem; color: var(--text-secondary); margin-bottom: .3rem; }
.visa-cost-item strong { font-size: 1.1rem; color: var(--accent); }
.visa-faq { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.visa-faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.visa-faq-item summary { padding: .875rem 1rem; font-weight: 600; cursor: pointer; color: var(--text-primary); }
.visa-faq-item summary:hover { color: var(--accent); }
.visa-faq-item p { padding: 0 1rem 1rem; color: var(--text-secondary); font-size: .875rem; line-height: 1.6; margin: 0; }

/* Company page */
.company-hero { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 2rem; flex-wrap: wrap; }
.company-avatar-lg { width: 72px; height: 72px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; color: #fff; flex-shrink: 0; }
.company-hero-text h1 { font-size: 1.8rem; font-weight: 800; margin: 0 0 .3rem; }
.company-hero-text p { color: var(--text-secondary); margin: 0; font-size: .9rem; }

/* ===================================================================
   CONTENT VISIBILITY (performance)
=================================================================== */
.posts-list, .hub-grid, .role-silo-links {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}
.skills-matrix-card, .visa-signal-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 280px;
}

/* ===================================================================
   RESPONSIVE — MOBILE
=================================================================== */
@media (max-width: 768px) {
  :root { --gap: 16px; --header-height: auto; }
  html, body { overflow-x: hidden; }

  /* Nav */
  .nav { height: auto; padding: 12px var(--gap); flex-wrap: nowrap; }
  .nav-right { gap: 0.25rem; }
  #menu { display: none; }
  .nav-hamburger { display: flex; }

  /* Hero */
  .profile { padding: 2rem 0.5rem 1.5rem; }
  .hero-brand-title { font-size: 2.6rem; }
  .hero-lead-h2 { font-size: 1.15rem; }
  .profile-buttons {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding-bottom: 6px;
    justify-content: flex-start;
    scrollbar-width: none;
  }
  .profile-buttons::-webkit-scrollbar { display: none; }
  .profile-buttons .button-link { white-space: nowrap; flex-shrink: 0; }

  /* Search */
  .searchbox form { flex-direction: column; padding: 10px; gap: 8px; }
  .searchbox-input-wrap { width: 100%; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
  .searchbox input[type="text"] { font-size: 1rem; }
  .searchbox-controls { display: flex; gap: 8px; width: 100%; }
  .searchbox-controls select { flex: 1; font-size: .84rem; }
  .searchbox-controls button { padding: 8px 16px; }

  /* Job cards */
  .post-entry { padding: 16px; border-radius: var(--radius); }
  .entry-header { flex-direction: column; gap: 6px; }
  .entry-header h2 { font-size: 1.1rem; }
  .entry-salary { align-self: flex-start; }
  .entry-subhead { font-size: 0.8rem; gap: 5px; }
  .entry-content { font-size: .85rem; margin-bottom: .75rem; }
  .entry-footer { font-size: .73rem; }

  /* Hub grid */
  .hub-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5rem; }
  .hub-tile { padding: 10px 12px; }
  .hub-tile-name { font-size: 0.8rem; }

  /* Filter pills */
  .filter-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .filter-pills::-webkit-scrollbar { display: none; }
  .filter-pill { white-space: nowrap; flex-shrink: 0; }

  /* Post detail */
  .post-title { font-size: 1.55rem; line-height: 1.3; }
  .post-actions { flex-direction: column; gap: 10px; }
  .post-actions .btn-papermod-primary, .post-actions .btn-papermod-secondary { width: 100%; justify-content: center; }
  .post-content h2 { font-size: 1.25rem; }
  .post-content h3 { font-size: 1.1rem; }
  .job-specs-grid { grid-template-columns: 1fr; }

  /* Pagination */
  .pagination { padding-top: 1rem; margin-top: 1.5rem; font-size: .8125rem; }
  .pagination a { padding: 8px 14px; }

  /* Footer */
  .footer { padding: calc(var(--gap) * 1.2) var(--gap); font-size: .78rem; }
  .footer-nav { gap: .75rem; }

  /* Audit table */
  .audit-table-row { grid-template-columns: 1fr 1fr; font-size: .8rem; }
  .audit-table-head { display: none; }
}

@media (max-width: 480px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
  .audit-table-row { grid-template-columns: 1fr; }
  .report-type-grid { grid-template-columns: repeat(2, 1fr); }
}