/* Shared stylesheet for SEO-static pages emitted by:
 *   - jobsSeoPagesPlugin.ts  (per-job HTML template, ~200k pages incl. previous-slug
 *                             bridges + cross-locale reconciliation)
 *   - seoHubsPlugin.ts       (buildThinCantonHubHtml: canton tutti/settori/aziende +
 *                             paginated /tutti/page-N/, ~3k pages × 4 locales)
 *
 * Loaded via:
 *   <link rel="stylesheet" href="/assets/seo-static.css?v=${BUILD_ID}">
 *
 * Why external: each per-job HTML used to inline ~3.5 KB of identical CSS. With
 * ~200k SEO HTML pages in dist, dedup → external file saves ~700 MB on disk.
 * Cache-busting via ?v=BUILD_ID query string (BUILD_ID = Date.now() at build).
 *
 * Color tokens (var(--color-*)) are defined in the SPA bundle CSS — these
 * pages either load that bundle async or rely on browser-default fallbacks
 * during the brief pre-hydration window.
 */

/* ── Per-job template (jobsSeoPagesPlugin) ───────────────────────────── */
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0;
  font-family: "Manrope", sans-serif;
  color: var(--color-body);
  background:
    radial-gradient(1100px 600px at 0% -10%, var(--color-job-bg-gradient-1), transparent 60%),
    radial-gradient(1000px 600px at 100% 0%, var(--color-job-bg-gradient-2), transparent 60%),
    var(--color-surface-alt);
}
/* Padding only for static pre-hydration content */
body > #root > main.static-job-page { padding: 26px; }
h1, h2, h3, h4 { margin: 0; font-family: "Outfit", sans-serif; }
main { max-width: 1120px; margin: 0 auto; display: grid; gap: 12px; }
.proposal {
  border: 1px solid var(--color-edge);
  background: var(--color-surface);
  border-radius: 20px;
  padding: 12px;
  overflow: hidden;
}
.hero {
  border: 1px solid var(--color-accent-border);
  background:
    linear-gradient(130deg, var(--color-job-hero-gradient-from), var(--color-job-hero-gradient-to));
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
}
.hero-title {
  font-size: 23px;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.hero-sub {
  margin-top: 4px;
  font-size: 14px;
  color: var(--color-subtle);
}
.hero-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.hero-meta span {
  border: 1px solid var(--color-edge);
  background: var(--color-job-chip-bg);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--color-body);
}
.section {
  border: 1px solid var(--color-edge);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 9px;
  background: var(--color-surface);
}
.section h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-subtle);
  margin-bottom: 8px;
}
.section p {
  margin: 0 0 8px 0;
  font-size: 14px;
  line-height: 1.58;
  color: var(--color-body);
}
.section ul {
  margin: 0;
  padding-left: 18px;
}
.section li {
  margin-bottom: 7px;
  font-size: 14px;
  line-height: 1.52;
  color: var(--color-body);
}
.section li.subhead {
  list-style: none;
  margin-left: -12px;
  margin-top: 4px;
  margin-bottom: 6px;
  font-weight: 800;
  color: var(--color-heading);
}
.timeline {
  position: relative;
  margin-left: 6px;
  padding-left: 16px;
  border-left: 2px dashed var(--color-accent-border);
}
.timeline-step {
  margin-bottom: 10px;
  position: relative;
}
.timeline-step::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--color-accent);
}
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  padding: 12px 20px;
  min-height: 44px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  background: var(--color-accent);
  color: var(--color-on-accent);
}
.related {
  margin-top: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-edge);
  border-radius: 16px;
  padding: 14px;
}
.related h2 {
  margin: 0 0 10px 0;
  font-size: 18px;
}

/* Related-jobs list (.rj/.rja/.rjw/.rjt/.rjs/.rjp) — extracted from
   PR #301 inline styles. Each rendered 6× per page in the per-job template. */
.rj { margin: 0 0 8px 0; }
.rja { display: flex; align-items: flex-start; gap: 12px; text-decoration: none; padding: 12px; border: 1px solid var(--color-edge); border-radius: 12px; }
.rjw { min-width: 0; flex: 1; }
.rjt { font-size: 14px; font-weight: 700; color: var(--color-heading); line-height: 1.3; }
.rjs { font-size: 12px; color: var(--color-subtle); margin-top: 2px; }
.rjp { font-size: 12px; font-weight: 600; color: var(--color-success); margin-top: 4px; }

/* Round-2 per-job extracts: back-nav, company card, related ul, footer nav. */
.bn { margin: 0 0 16px; font-size: 14px; }
.bn a { color: var(--color-accent); text-decoration: none; font-weight: 600; }
.cb { display: flex; align-items: flex-start; gap: 12px; text-decoration: none; padding: 16px; border: 1px solid var(--color-edge); border-radius: 12px; margin-top: 12px; }
.cbt { font-size: 14px; font-weight: 700; color: var(--color-heading); }
.cbs { font-size: 14px; color: var(--color-subtle); margin-top: 4px; }
.cbm { font-size: 14px; color: var(--color-subtle); margin-top: 8px; }
.cbl { margin: 12px 0 0; font-size: 15px; }
.cbl a { color: var(--color-link); text-decoration: underline; font-weight: 700; }
.rul { list-style: none; padding: 0; margin: 0; }
.lnk-acc { color: var(--color-link); text-decoration: none; font-weight: 600; }
.pill { display: inline-flex; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 13px; }
.pill-a { background: var(--color-accent-subtle); color: var(--color-accent); }
.pill-w { background: var(--color-warning-subtle); color: var(--color-warning); }
.pillrow { display: flex; flex-wrap: wrap; gap: 10px; }
.fn { margin: 24px 0 0; padding: 16px 0; border-top: 1px solid var(--color-edge); font-size: 14px; }

@media (max-width: 980px) {
  body > #root > main.static-job-page { padding: 14px; }
  .hero-title { font-size: 22px; }
}

/* ── Canton-hub template (seoHubsPlugin / buildThinCantonHubHtml) ────── */
/* Different namespace (.th*) — no conflict with per-job classes above. */
.thp, .thc {
  display: inline-block;
  padding: 4px 10px;
  margin: 2px;
  border-radius: 6px;
  font-size: 13px;
}
.thp {
  background: var(--color-surface);
  color: var(--color-link);
  text-decoration: none;
  border: 1px solid var(--color-edge);
}
.thc {
  background: var(--color-accent);
  color: var(--color-on-accent);
}
.thi {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--color-heading);
  background: var(--color-surface);
  text-decoration: none;
  border: 1px solid var(--color-edge);
  font-size: 14px;
  line-height: 1.4;
}
.thi-s {
  display: block;
  font-size: 12px;
  color: var(--color-subtle);
  margin-top: 2px;
}

/* ── Soft-landing template (jobsSeoPagesPlugin / buildSoftLandingHtml) ── */
/* ~98k expired-job soft-landing pages — each one inlined ~1 KB of
   identical CSS for nav/footer/article/dark-mode. Extraction here saves
   ~100 MB across dist. */
.ft-static-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-job-sticky-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-job-sticky-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  padding: 0 16px;
}
.ft-static-nav .ft-row {
  max-width: 2400px;
  width: 95%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 12px;
}
.ft-static-nav .ft-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-link);
  font-weight: 700;
  font-size: 15px;
  font-family: system-ui, sans-serif;
}
.ft-static-nav .ft-spacer { flex: 1; }
.ft-static-nav .ft-section {
  font-size: 13px;
  color: var(--color-accent);
  text-decoration: none;
  font-family: system-ui, sans-serif;
}
.ft-static-article {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px;
  font-family: system-ui, sans-serif;
  color: var(--color-body);
}
.ft-static-footer {
  border-top: 1px solid var(--color-edge);
  background: var(--color-surface);
  padding: 24px 16px;
  margin-top: auto;
  font-family: system-ui, sans-serif;
  font-size: 13px;
  color: var(--color-subtle);
  text-align: center;
}
.ft-static-footer .ft-wrap { max-width: 1280px; margin: 0 auto; }
.ft-static-footer a { color: var(--color-accent); text-decoration: none; }

/* Dark-mode (moved from inline `darkModeStyles` in jobsSeoPagesPlugin.ts). */
.dark body { background: #0f172a; color: #e2e8f0; }
.dark .ft-static-nav {
  background: rgba(15, 23, 42, .7);
  border-color: rgba(30, 41, 59, .5);
}
.dark .ft-static-nav a { color: #93c5fd; }
.dark .ft-static-article { color: #e2e8f0; }
.dark .ft-static-article a { color: #818cf8; }
.dark .ft-static-footer {
  background: rgba(15, 23, 42, .5);
  border-color: rgba(30, 41, 59, 1);
  color: #94a3b8;
}
.dark .ft-static-footer a { color: #93c5fd; }
