/* ============================================================
   jobs.css — Editorial jobs board (SEEK/LinkedIn two-column)
   Loaded only on /jobs/ (scoped via body.jobs).
   Mirrors the token system from editorial.css so the page
   inherits the same newsprint aesthetic.
   ============================================================ */

/* ---------- Page-scoped token overrides ----------
   Shared tokens come from tokens.css (:root). Jobs uses the default warm
   paper and the default spacing scale, so only its type scale differs. */
body.jobs {
	/* Type scale */
	--fs-kicker: 0.65rem;
	--fs-byline: 0.7rem;
	--fs-list-hed: 1.05rem;
	--fs-detail-hed: clamp(1.6rem, 3vw, 2.4rem);
	--fs-standfirst: 1rem;
}

/* ---------- Page base ---------- */
body.jobs {
	background: var(--background-white);
	color: var(--ink);
	font-family: var(--font-furniture);
	font-size: 15px;
	line-height: 1.55;
  font-variant-numeric: lining-nums;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Subtle paper grain */
body.jobs::before {
	content: '';
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 9999;
	opacity: 0.035;
	mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Resets scoped to jobs page ---------- */
body.jobs #jobsPage,
body.jobs #jobsPage * {
	border-radius: 0 !important;
	box-shadow: none !important;
}

body.jobs #jobsPage a {
	text-decoration: none;
	transition: color 180ms ease;
}

body.jobs #jobsPage a:hover,
body.jobs #jobsPage a:focus-visible {
	color: var(--link-hover);
}

body.jobs #jobsPage *:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* Neutralise the legacy newsBody/orangeTable chrome that wraps the page */
body.jobs #jobsPage .newsBody,
body.jobs #jobsPage .orangeTable {
	background: transparent;
	border: 0;
	padding: 0;
}

body.jobs #jobsPage .headerBox {
	display: none !important;
}

/* ---------- Typography primitives ---------- */
body.jobs .kicker {
	font-family: var(--font-furniture);
	font-size: var(--fs-kicker);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--ink);
	display: inline-block;
}

body.jobs .kicker--accent {
	color: var(--accent);
}

body.jobs .hed {
	font-family: var(--font-furniture);
	font-weight: 800;
	font-variation-settings: 'opsz' 144;
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--ink);
	margin: 0;
}

body.jobs .hed--list {
	font-size: var(--fs-list-hed);
	font-weight: 700;
	line-height: 1.2;
	font-variation-settings: 'opsz' 24;
}

body.jobs .hed--detail {
	font-size: var(--fs-detail-hed);
	font-weight: 900;
	line-height: 1.05;
	letter-spacing: -0.015em;
}

body.jobs .byline {
	font-family: var(--font-furniture);
	font-size: var(--fs-byline);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
}

body.jobs .byline .sep {
	margin: 0 0.5em;
	color: var(--muted);
}

/* ---------- Page shell overrides ---------- */
/* The news-layout wrapper inherited from news_m.css would force a
   3-column grid; on jobs we want the content column to span full width. */
body.jobs #wrapper .container.news-page-main .section.group.news-layout {
	display: block;
	grid-template-columns: none;
  background-color: var(--white);
}

body.jobs #jobsPage {
	width: 100%;
	max-width: clamp(1100px, calc(60vw + 280px), 1440px);
	margin: 0 auto;
	padding: var(--s-6) clamp(16px, 4vw, 72px) 0;
}

/* ---------- Masthead ---------- */
body.jobs .jobs-masthead {
	border-top: 2px solid var(--ink);
	border-bottom: 1px solid var(--ink);
	padding: var(--s-4) 0 var(--s-3);
	margin-bottom: var(--s-5);
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--s-4);
}

body.jobs .jobs-masthead__title {
	font-family: var(--font-furniture);
	font-weight: 900;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1;
	letter-spacing: -0.02em;
	margin: 0;
}

body.jobs .jobs-masthead__meta {
	font-family: var(--font-furniture);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.78rem;
	color: var(--muted);
}

body.jobs .jobs-masthead__meta strong {
	color: var(--ink);
	font-weight: 700;
}

/* ---------- Filter bar ---------- */
body.jobs .jobs-filter {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) auto auto;
	gap: var(--s-4);
	align-items: anchor-center;
	padding: var(--s-4) 0 var(--s-5);
	border-bottom: 1px solid var(--ink);
	margin-bottom: var(--s-6);
  background: var(--white);
  padding: var(--s-5);
}

body.jobs .jobs-filter__field {
	display: flex;
	flex-direction: column;
	gap: var(--s-1);
	min-width: 0;
}

body.jobs .jobs-filter__label {
	font-family: var(--font-furniture);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--muted);
}

body.jobs .jobs-filter__input,
body.jobs .jobs-filter__select {
	font-family: var(--font-furniture);
	font-size: 1rem;
	color: var(--ink);
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--ink);
	padding: var(--s-2) 0;
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
}

body.jobs .jobs-filter__select {
	background-image:
		linear-gradient(45deg, transparent 50%, var(--ink) 50%),
		linear-gradient(135deg, var(--ink) 50%, transparent 50%);
	background-position: right 4px top 55%, right 0 top 55%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 18px;
}

body.jobs .jobs-filter__input::placeholder {
	color: var(--muted);
	font-style: italic;
}

body.jobs .jobs-filter__submit {
	background: var(--ink);
	color: var(--paper);
	font-family: var(--font-furniture);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	font-size: 0.8rem;
	border: 0;
	padding: var(--s-3) var(--s-5);
	cursor: pointer;
	transition: background 160ms ease;
	white-space: nowrap;
}

body.jobs .jobs-filter__submit:hover {
	background: var(--accent);
}

body.jobs .jobs-filter__clear {
	font-family: var(--font-furniture);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.75rem;
	color: var(--accent);
	text-decoration: none;
	padding-bottom: var(--s-3);
	align-self: end;
}

body.jobs .jobs-filter__clear:hover {
	text-decoration: underline;
}

/* ---------- Two-column layout ---------- */
body.jobs .jobs-layout {
	display: grid;
	grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
	gap: clamp(24px, 3vw, 48px);
	align-items: start;
}

body.jobs .jobs-layout__list {
	border-top: 2px solid var(--ink);
	border-bottom: 1px solid var(--ink);
	max-height: calc(100vh - 120px);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--ink) transparent;
}

body.jobs .jobs-layout__list::-webkit-scrollbar {
	width: 6px;
}

body.jobs .jobs-layout__list::-webkit-scrollbar-thumb {
	background: var(--ink);
}

body.jobs .jobs-layout__detail {
	position: sticky;
	top: var(--s-5);
	max-height: calc(100vh - 120px);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--ink) transparent;
	background: var(--white);
	border-radius: 4px;
	padding: var(--s-5);
}

body.jobs .jobs-layout__detail::-webkit-scrollbar {
	width: 6px;
}

body.jobs .jobs-layout__detail::-webkit-scrollbar-thumb {
	background: var(--ink);
}

/* ---------- List items ---------- */
body.jobs .jobs-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

body.jobs .jobs-list__item {
	display: flex;
	flex-direction: column;
	gap: var(--s-2);
	padding: var(--s-4) var(--s-5) var(--s-4) calc(var(--s-5) - 3px);
	border-top: 1px solid var(--rule-soft);
	border-left: 3px solid transparent;
	cursor: pointer;
	transition: background 140ms ease, border-left-color 140ms ease;
	background: var(--paper-pure);
}

body.jobs .jobs-list__item:first-child {
	border-top: 0;
}

body.jobs .jobs-list__item:hover {
	background: var(--tint);
}

body.jobs .jobs-list__item[aria-selected="true"] {
	background: var(--white);
	border-left-color: var(--ink);
}

body.jobs .jobs-list__kicker {
	font-family: var(--font-furniture);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.65rem;
	font-weight: 700;
	color: var(--accent);
}

body.jobs .jobs-list__title {
	font-family: var(--font-furniture);
	font-weight: 700;
	font-size: var(--fs-list-hed);
	line-height: 1.2;
	color: var(--ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

body.jobs .jobs-list__company {
	font-family: var(--font-furniture);
	font-size: 0.92rem;
	color: var(--ink-soft);
	font-weight: 600;
}

body.jobs .jobs-list__meta {
	font-family: var(--font-furniture);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.7rem;
	color: var(--muted);
}

/* ---------- Detail pane ---------- */
body.jobs .jobs-detail__back {
	display: none;
	align-items: center;
	gap: var(--s-2);
	font-family: var(--font-furniture);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.75rem;
	font-weight: 700;
	background: transparent;
	border: 0;
	padding: 0 0 var(--s-4);
	cursor: pointer;
	color: var(--ink);
  background: var(--white);
}

body.jobs .jobs-detail__back:hover {
	color: var(--accent);
}

body.jobs .jobs-detail__image {
  width: 100%;
  height: 300px;
  border-radius: 4px;
  margin-bottom: var(--s-5);

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body.jobs .jobs-detail__header {
	padding-bottom: var(--s-4);
	border-bottom: 1px solid var(--ink);
	margin-bottom: var(--s-5);
}

body.jobs .jobs-detail__kicker {
	display: inline-block;
	margin-bottom: var(--s-3);
	font-family: var(--font-furniture);
	text-transform: uppercase;
	letter-spacing: 0.18em;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--accent);
	padding: var(--s-1) var(--s-3);
	border: 1px solid var(--accent);
}

body.jobs .jobs-detail__kicker:empty {
	display: none;
}

body.jobs .jobs-detail__title {
	font-family: var(--font-furniture);
	font-weight: 900;
	font-size: var(--fs-detail-hed);
	line-height: 1.05;
	letter-spacing: -0.015em;
	margin: 0 0 var(--s-4);
	color: var(--ink);
}

body.jobs .jobs-detail__byline {
	display: flex;
	flex-wrap: wrap;
	gap: var(--s-2) var(--s-4);
	font-family: var(--font-furniture);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 0.78rem;
	color: var(--muted);
	margin-bottom: var(--s-5);
}

body.jobs .jobs-detail__byline .company {
	color: var(--ink);
	font-weight: 700;
}

body.jobs .jobs-detail__apply {
	display: inline-flex;
	align-items: center;
	gap: var(--s-2);
	background: var(--ink);
	color: var(--paper);
	font-family: var(--font-furniture);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	font-size: 0.85rem;
	padding: var(--s-4) var(--s-6);
	text-decoration: none;
	transition: background 160ms ease, color 160ms ease;
}

body.jobs .jobs-detail__apply:hover {
	background: var(--accent);
	color: var(--paper);
}

body.jobs .jobs-detail__apply .arrow {
	display: inline-block;
	transition: transform 160ms ease;
}

body.jobs .jobs-detail__apply:hover .arrow {
	transform: translateX(4px);
}

body.jobs .jobs-detail__body {
	font-family: var(--font-furniture);
	font-size: 1.02rem;
	line-height: 1.65;
	color: var(--ink-soft);
	max-width: 65ch;
}

body.jobs .jobs-detail__body p {
	margin: 0 0 var(--s-4);
}

body.jobs .jobs-detail__body h2,
body.jobs .jobs-detail__body h3 {
	font-family: var(--font-furniture);
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: var(--s-6) 0 var(--s-3);
	color: var(--ink);
}

body.jobs .jobs-detail__body h2 { font-size: 1.4rem; }
body.jobs .jobs-detail__body h3 { font-size: 1.15rem; }

body.jobs .jobs-detail__body ul,
body.jobs .jobs-detail__body ol {
	margin: 0 0 var(--s-4) var(--s-5);
	padding: 0;
}

body.jobs .jobs-detail__body li {
	margin: 0 0 var(--s-2);
}

body.jobs .jobs-detail__body a {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

body.jobs .jobs-detail__body a:hover {
	color: var(--accent);
}

body.jobs .jobs-detail__empty {
	font-style: italic;
	color: var(--muted);
	padding: var(--s-5) 0;
	border-top: 1px solid var(--rule-soft);
	border-bottom: 1px solid var(--rule-soft);
}

/* Drop cap on the first paragraph of the description — editorial flourish */
body.jobs .jobs-detail__body > p:first-of-type::first-letter {
	font-family: var(--font-furniture);
	font-weight: 900;
	float: left;
	font-size: 3.4em;
	line-height: 0.85;
	padding: 0.05em 0.1em 0 0;
	color: var(--accent);
}

/* Footer CTA within detail pane */
body.jobs .jobs-detail__footer {
	margin-top: var(--s-7);
	padding-top: var(--s-5);
	border-top: 1px solid var(--ink);
}

/* ---------- Empty state ---------- */
body.jobs .jobs-empty {
	grid-column: 1 / -1;
	padding: var(--s-9) var(--s-5);
	text-align: center;
	border-top: 2px solid var(--ink);
	border-bottom: 1px solid var(--ink);
}

body.jobs .jobs-empty__rule {
	font-family: var(--font-furniture);
	text-transform: uppercase;
	letter-spacing: 0.22em;
	font-size: 0.75rem;
	color: var(--muted);
	margin-bottom: var(--s-4);
}

body.jobs .jobs-empty__hed {
	font-family: var(--font-furniture);
	font-weight: 900;
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	line-height: 1.1;
	letter-spacing: -0.01em;
	margin: 0 0 var(--s-4);
}

body.jobs .jobs-empty__cta {
	font-family: var(--font-furniture);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.8rem;
	color: var(--accent);
	text-decoration: none;
	border-bottom: 1px solid var(--accent);
	padding-bottom: 2px;
}

body.jobs .jobs-empty__cta:hover {
	color: var(--ink);
	border-bottom-color: var(--ink);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	body.jobs .jobs-filter {
		grid-template-columns: 1fr 1fr;
	}

	body.jobs .jobs-filter__submit,
	body.jobs .jobs-filter__clear {
		grid-column: auto;
	}
}

@media (max-width: 900px) {
	body.jobs .jobs-layout {
		grid-template-columns: 1fr;
	}

	body.jobs .jobs-layout__list {
		max-height: none;
		overflow-y: visible;
	}

	body.jobs .jobs-layout__detail {
		position: static;
	}

	body.jobs .jobs-detail__back {
		display: inline-flex;
	}

	/* Drill-in: only one view at a time */
	body.jobs .jobs-layout[data-view="list"] .jobs-layout__detail {
		display: none;
	}

	body.jobs .jobs-layout[data-view="detail"] .jobs-layout__list {
		display: none;
	}
}

@media (max-width: 640px) {
	body.jobs #jobsPage {
		padding: var(--s-4) var(--s-4) var(--s-7);
	}

	body.jobs .jobs-filter {
		grid-template-columns: 1fr;
		gap: var(--s-3);
	}

	body.jobs .jobs-filter__submit {
		width: 100%;
	}

	body.jobs .jobs-detail__title {
		font-size: 1.7rem;
	}

	body.jobs .jobs-detail__body > p:first-of-type::first-letter {
		font-size: 2.8em;
	}
}
