/* Stylesheet for dynamically-rendered fallback pages (Cloudflare Pages Functions in /functions).
   Optimized for elite Mobile UI/UX and zero visual glitch. */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #0f172a; /* slate-900 */
  background: #ffffff;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
a {
  color: #0f172a;
}
/* --- Header Section (Clean 1-line mobile navigation) --- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .brand {
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  color: #0f172a;
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.site-header nav::-webkit-scrollbar {
  display: none;
}
.site-header nav a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: #475569; /* slate-600 */
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.site-header nav a:hover {
  color: #0f172a;
  background: #f1f5f9;
}
.site-header nav a.nav-btn {
  background: #0f172a;
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 14px;
}
.site-header nav a.nav-btn:hover {
  background: #1e293b;
}
@media (min-width: 640px) {
  .site-header {
    padding: 14px 24px;
    gap: 16px;
  }
  .site-header .brand {
    font-size: 1.15rem;
  }
  .site-header nav {
    gap: 8px;
  }
  .site-header nav a {
    font-size: 0.9rem;
    padding: 8px 12px;
  }
  .site-header nav a.nav-btn {
    padding: 8px 16px;
  }
}
/* --- Main Layout (Mobile-first screen usage) --- */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 4px 10px 32px;
}
@media (min-width: 640px) {
  main {
    padding: 36px 24px 60px;
  }
}
/* --- Navigation & Typography --- */
.breadcrumb {
  margin: 0 0 8px;
}
.breadcrumb a {
  font-size: 0.75rem;
  color: #64748b; /* slate-500 */
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 2px 4px;
  margin-left: -4px;
  border-radius: 6px;
}
.breadcrumb a:hover {
  color: #0f172a;
  background: #f1f5f9;
}
h1 {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 8px;
  letter-spacing: -0.025em;
}
@media (min-width: 640px) {
  h1 {
    font-size: 2rem;
    margin: 0 0 12px;
  }
}
.job-meta, .company-meta {
  color: #475569;
  font-size: 0.9rem;
  margin: 0 0 20px;
}
.job-meta a, .company-meta a {
  color: #475569;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 2px 4px;
  display: inline-block;
}
.job-meta a:hover, .company-meta a:hover {
  color: #0f172a;
}
/* --- Action Buttons & Mobile Sticky CTA --- */
.apply-button, .website-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #ffffff !important;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  min-height: 48px;
  transition: background 0.15s, transform 0.1s;
}
.apply-button:hover, .website-button:hover {
  background: #1e293b;
}
.sticky-cta-container {
  display: block;
  margin-bottom: 24px;
}
@media (max-width: 639px) {
  .has-sticky-cta {
    padding-bottom: 88px !important;
  }
  .sticky-cta-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e2e8f0;
    padding: 12px 16px;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    z-index: 100;
    margin-bottom: 0;
    display: flex;
    gap: 8px;
  }
  .sticky-cta-container .apply-button,
  .sticky-cta-container .website-button {
    flex: 1;
    width: 100%;
    margin-bottom: 0 !important;
    border-radius: 12px;
  }
}
/* --- Job Description & AI Summaries --- */
.job-description, .ai-company-overview {
  border-top: 1px solid #e2e8f0;
  padding-top: 24px;
  color: #334155;
  font-size: 1rem;
  line-height: 1.7;
}
.job-description p, .ai-company-overview p {
  margin: 0 0 16px;
}
.job-description h2, .job-description h3,
.ai-company-overview h2, .ai-company-overview h3 {
  color: #0f172a;
  margin: 24px 0 12px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.job-description ul, .job-description ol {
  margin: 0 0 16px;
  padding-left: 20px;
}
.job-description li {
  margin-bottom: 6px;
}
/* --- Cards Layout --- */
.job-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 12px;
}
.job-list li {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.job-list li:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}
.job-list a {
  display: block;
  padding: 16px;
  text-decoration: none;
  color: #0f172a;
  outline: none;
  font-weight: 700;
  font-size: 1rem;
}
.job-list .meta {
  display: block;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 400;
  margin-top: 4px;
}
/* --- System Notices --- */
.notice {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 14px;
  padding: 12px 16px;
  color: #0369a1;
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.5;
}
.notice a {
  color: #0284c7;
  font-weight: 700;
  text-decoration: underline;
  padding: 2px 4px;
  display: inline-block;
}
/* --- Related Jobs Section --- */
.related-jobs {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}
.related-jobs h2 {
  font-size: 1.2rem;
  margin: 0 0 12px;
}
/* --- Job Alert Box & Responsive Form --- */
.alert-box {
  margin-top: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #f8fafc;
  padding: 20px;
}
.alert-badge {
  display: inline-flex;
  background: #e2e8f0;
  color: #475569;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.alert-box h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.alert-box p {
  color: #475569;
  font-size: 0.875rem;
  margin: 0 0 16px;
}
.alert-form {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
.alert-form input.hp {
  display: none;
}
.alert-form input[type="email"],
.alert-form input[type="text"] {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 16px;
  font-family: inherit;
  width: 100%;
  color: #0f172a;
  background: #ffffff;
  min-height: 44px;
}
.alert-form input:focus {
  border-color: #0f172a;
  outline: none;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.05);
}
.alert-form button {
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: background 0.15s;
}
.alert-form button:hover {
  background: #1e293b;
}
.alert-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.alert-message {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #475569;
  font-weight: 500;
}
@media (min-width: 640px) {
  .alert-box {
    padding: 28px;
  }
  .alert-form {
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
  }
  .alert-form button {
    width: auto;
  }
}
/* --- Footer Section --- */
.site-footer {
  border-top: 1px solid #e2e8f0;
  padding: 24px 16px;
  text-align: center;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.5;
  background: #ffffff;
}
.site-footer nav {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.site-footer nav a {
  color: #64748b;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 6px;
}
.site-footer nav a:hover {
  color: #0f172a;
  background: #f1f5f9;
}