/* ==========================================================================
   TYTEN v2 — Careers role page (/careers/<slug>.html)
   Rendered by analytics/main.py (get_dynamic_job_posting) from the job_postings
   table. Loaded after careers.css, whose .car-role__tag pills and .car-closing
   block it reuses. The hero and back link are shared with the apply page.
   Every colour is a --v2-* token so day and night both work.
   ========================================================================== */

/* Hero -------------------------------------------------------------------- */
.crr-hero__inner {
  display: grid;
  gap: clamp(1.25rem, 1rem + 1vw, 1.875rem);    /* 20 → 30 */
  justify-items: start;
}
.crr-hero__title {
  max-width: 1100px;
  text-wrap: balance;
  overflow-wrap: anywhere;                       /* long single words never push the page wide */
}
.crr-hero__tags { margin-top: 2px; }
.crr-hero__comp {
  max-width: 760px;
  margin: 0;
  padding: 10px 16px;
  font-size: var(--v2-fs-small);
  line-height: 1.45;
  white-space: normal;
}
.crr-hero__actions { margin-top: 6px; }

/* "← All open roles" / "← Back to Job Posting" */
.crr-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--v2-fs-small);
  font-weight: 600;
  color: var(--v2-text-muted);
  text-decoration: none;
  transition: color var(--v2-dur) ease;
}
.crr-back:hover { color: var(--v2-accent-ink); }
.crr-back__arrow { display: inline-block; transition: transform var(--v2-dur) ease; }
.crr-back:hover .crr-back__arrow { transform: translateX(-4px); }

/* Role sections: heading column + prose column, rows split by rules ---------- */
.crr-body__inner {
  display: grid;
  border-bottom: 1px solid var(--v2-line-soft);
}
.crr-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px 56px;
  padding: clamp(2rem, 1.6rem + 1.4vw, 2.75rem) 0;   /* 32 → 44, as .car-role */
  border-top: 1px solid var(--v2-line-soft);
}
@media (min-width: 900px) {
  .crr-block { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
}
.crr-block__title {
  margin: 0;
  font-family: var(--v2-font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.35rem + 0.6vw, 1.875rem);   /* 24 → 30 */
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--v2-text);
}

/* markdown_to_html() output: <p>, <ul><li>, <strong>, <a> ------------------- */
.crr-prose { min-width: 0; overflow-wrap: anywhere; }
.crr-prose strong { color: var(--v2-text); font-weight: 700; }
.crr-prose a {
  color: var(--v2-accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.crr-prose a:hover { text-decoration-thickness: 2px; }
.crr-prose ul {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}
.crr-prose > :first-child { margin-top: 0; }
.crr-prose > ul + ul { margin-top: 10px; }        /* one-line lists render as separate <ul>s */
.crr-prose li {                                    /* li holds mixed inline content: no grid/flex */
  position: relative;
  padding-left: 28px;
}
.crr-prose li::before {                            /* accent dash, as .v2-dash-list */
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 16px;
  height: 1px;
  background: var(--v2-accent-deep);
}

@media (prefers-reduced-motion: reduce) {
  .crr-back__arrow { transition: none; }
  .crr-back:hover .crr-back__arrow { transform: none; }
}
