/* TrainAI UK — editorial careers typography, ink and brass */
:root {
  --ink: #0c1822;
  --navy: #132433;
  --navy-2: #1a3144;
  --navy-3: #234056;
  --cream: #f4efe6;
  --paper: #fbf8f2;
  --card: #fffdf9;
  --gold: #b8893e;
  --gold-2: #d4b36a;
  --gold-dim: #7a5c28; /* 4.5:1+ on cream for small kicker text */
  --rule: #d7ccb8;
  --rule-dark: #3a4d5c;
  --burgundy: #7a3030;
  --text: #1a232b;
  --muted: #5c6670;
  --muted-2: #636d78; /* 4.5:1+ on cream and card */
  --chip: #efe8dc;
  --chip-text: #3d2f16;
  --shadow: 0 18px 40px rgba(12, 24, 34, 0.1);
  --radius: 18px;
  --max: 1180px;
  /* Height of the sticky site header. The sticky table header sits just below it. */
  --header-h: 79px;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
/* Anchor jumps (#roles, #main) land below the sticky header, not under it. */
html { scroll-padding-top: calc(var(--header-h) + 12px); }
/* A display value on a hidden element would otherwise beat [hidden]. */
[hidden] { display: none !important; }

/* Keyboard focus: visible, but not on mouse clicks. */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.site-header :focus-visible,
.hero :focus-visible { outline-color: var(--gold-2); }
.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 60;
  background: var(--gold);
  color: var(--ink);
  font-weight: 650;
  padding: 10px 18px;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; }
body {
  margin: 0;
  color: var(--text);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  background-image:
    radial-gradient(1200px 500px at 10% -10%, rgba(184, 137, 62, 0.08), transparent 50%),
    radial-gradient(900px 400px at 110% 0%, rgba(19, 36, 51, 0.06), transparent 45%);
}
img { max-width: 100%; }
a { color: var(--navy-2); }
a:hover { color: var(--gold-dim); }
.wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }

/* Header */
.site-header {
  background: var(--ink);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(212, 179, 106, 0.22);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-mark,
.brand-logo {
  height: 36px;
  width: auto;
  flex: none;
  display: block;
}
.brand-logo {
  height: 38px;
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand-tag {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-top: 4px;
  font-weight: 500;
}
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav a { color: #e8e0d2; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-2); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(212, 179, 106, 0.4);
  color: var(--cream);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.85rem;
}

/* Hero */
.hero {
  background:
    linear-gradient(180deg, rgba(12, 24, 34, 0.2), rgba(12, 24, 34, 0.55)),
    linear-gradient(135deg, #0c1822 0%, #1a3144 55%, #1d3a30 140%);
  color: var(--cream);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cpath d='M0 80h160M80 0v160' stroke='%23d4b36a' stroke-opacity='0.06' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.hero-copy > :last-child { margin-bottom: 0; }
.hero-panel {
  background: rgba(255, 253, 249, 0.05);
  border: 1px solid rgba(212, 179, 106, 0.32);
  border-radius: 16px;
  padding: 24px 24px 20px;
}
.hero-panel-kicker {
  margin: 0 0 16px;
  color: var(--gold-2);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 650;
}
.hero-stats { margin: 0; display: grid; gap: 12px; }
.hero-stats > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(212, 179, 106, 0.18);
  padding-bottom: 12px;
}
.hero-stats > div:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-stats dt { color: #cfc6b8; font-size: 0.92rem; }
.hero-stats dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}
.hero-panel-note { margin: 18px 0 14px; font-size: 0.86rem; color: #c9c0b2; }
.hero-panel-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 179, 106, 0.5);
}
.hero-panel-link:hover { color: var(--cream); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold-2);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 4.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  max-width: 16ch;
}
.hero-lead {
  font-size: 1.15rem;
  max-width: 42rem;
  color: #d9d1c4;
  margin: 0 0 28px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 22px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(212, 179, 106, 0.35);
  background: rgba(255, 253, 249, 0.06);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.84rem;
  color: #f0e6d4;
}
.earn-note {
  max-width: 44rem;
  font-size: 0.95rem;
  color: #cfc6b8;
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 16px;
  margin: 8px 0 0;
}
.earn-note a { color: var(--gold-2); }

/* Sections */
.section { padding: 64px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 28px;
}
.section h2, .page-title, .job-hero h1 {
  font-family: var(--serif);
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.section h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 0; }
.kicker {
  color: var(--gold-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 650;
  margin: 0 0 8px;
}

/* Filters + cards */
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.filter-count {
  margin: 0 0 22px;
  font-size: 0.84rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 6px;
  font-weight: 600;
}
.filter-btn {
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.filter-btn:hover { border-color: var(--gold); }
.filter-btn.is-on, .filter-btn[aria-pressed="true"] {
  background: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.role-card, .guide-card, .platform-card, .panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.role-card {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 18px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.role-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--gold), var(--gold-dim));
}
.role-card:hover { transform: translateY(-3px); box-shadow: 0 22px 50px rgba(12,24,34,.14); }
.role-card .top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}
.badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 650;
  background: var(--chip);
  color: var(--chip-text);
  border-radius: 999px;
  padding: 4px 9px;
}
.badge.telus { background: #e8eef3; color: #1c3a52; }
.badge.outlier { background: #ece6f4; color: #3a2a55; }
.badge.micro1 { background: #e7f0ea; color: #1d3d30; }
.badge.mercor { background: #f3e9d6; color: #4a3414; }
.badge.respondent { background: #f6e6e4; color: #5a2723; }
.badge.handshake { background: #e3eef0; color: #1a3f46; }
.pay {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.pay-note { font-size: 0.8rem; color: var(--muted); margin: 0 0 10px; }
.role-card h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.role-card p { margin: 0 0 14px; color: var(--muted); font-size: 0.95rem; flex: 1; }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.meta-chip {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px 9px;
}
.empty-filter { display: none; color: var(--muted); padding: 12px 0 0; }
.role-card.is-hidden, [data-card].is-hidden { display: none !important; }

/* Homepage roles table */
/* The sticky <thead> must stick to the page, not to a box around the table.
 * Any ancestor with overflow other than visible/clip becomes the sticky
 * element's scroll container, and the header's top offset is then measured
 * from that box: the header slid down over the first rows, and over the only
 * row once a filter left one or two. So neither wrapper here creates a scroll
 * container. overflow: clip keeps the rounded corners without doing so; the
 * header cells round their own top corners for browsers without clip. */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: visible;
}
@supports (overflow: clip) {
  .table-wrap { overflow: clip; }
}
.table-scroll { overflow: visible; }
.role-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 820px;
}
/* Column widths are hints: they stop Pay and Where competing for space. */
.role-table .col-role { width: 33%; }
.role-table .col-platform { width: 12%; }
.role-table .col-field { width: 12%; }
.role-table .col-pay { width: 19%; }
.role-table .col-where { width: 16%; }
.role-table .col-apply { width: 8%; }
.role-table thead th {
  position: sticky;
  top: var(--header-h);
  z-index: 2;
  text-align: left;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 650;
  padding: 13px 16px;
  border-bottom: 2px solid var(--gold);
  white-space: nowrap;
}
.role-table thead th:first-child { padding-left: 20px; border-top-left-radius: calc(var(--radius) - 1px); }
.role-table thead th:last-child { padding-right: 16px; text-align: right; border-top-right-radius: calc(var(--radius) - 1px); }
.role-table.is-short thead th { position: static; }
/* No-results row: a real table row, so the header never sits over nothing. */
.role-table .empty-row td {
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
}
.role-table .empty-row strong { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 4px; }
.role-table .empty-row span { display: block; margin-bottom: 12px; }

.role-table tbody tr.empty-row:hover { background: transparent; }
/* Search box above the filters */
.filter-search { gap: 10px; }
.search-input {
  flex: 1 1 260px;
  max-width: 420px;
  min-height: 40px;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: 0.95rem;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-color: var(--gold-dim); }
.role-table tbody tr {
  border-top: 1px solid var(--rule);
  vertical-align: middle;
}
.role-table tbody tr:first-child { border-top: 0; }
.role-table tbody tr:hover { background: #f6efe4; }
.role-table td {
  padding: 14px 16px;
  color: var(--text);
  vertical-align: middle;
}
.role-table td:first-child { padding-left: 20px; }
.role-table .role-name {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--navy);
  text-decoration: none;
  line-height: 1.25;
}
.role-table .role-name:hover { color: var(--gold-dim); }
.role-table .pay-cell {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.role-table .where-cell {
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 16rem;
}
.role-table .apply-cell { text-align: right; white-space: nowrap; }
.btn-table {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  background: var(--gold);
  color: var(--ink);
  font-weight: 650;
  font-size: 0.82rem;
  border-radius: 9px;
  padding: 8px 12px;
  text-decoration: none;
  font-family: inherit;
  border: 0;
}
.btn-table:hover { background: var(--gold-2); color: var(--ink); }
.btn-table .ad-flag { margin-right: 0; }
.sort-btn {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  font-weight: inherit;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sort-btn:hover { color: var(--gold-2); }
.sort-ind { color: var(--gold-2); font-size: 0.85rem; letter-spacing: 0; text-transform: none; min-width: 0.8em; }
.table-note { font-size: 0.8rem; color: var(--muted); margin: 12px 0 0; }
.mobile-sort { display: none; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }



/* Job page */
.job-hero {
  background: var(--ink);
  color: var(--cream);
  padding: 48px 0 40px;
}
.crumbs { font-size: 0.85rem; color: #b9b1a4; margin: 0 0 18px; }
.crumbs a { color: var(--gold-2); text-decoration: none; }
.job-hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0 0 12px; }
.job-sub { color: #d5cdc0; margin: 0 0 22px; }
.pay-box {
  display: inline-block;
  background: rgba(255,253,249,0.07);
  border: 1px solid rgba(212,179,106,0.35);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 0 0 8px;
}
.pay-box .pay { color: var(--gold-2); font-size: 1.8rem; }
.pay-box .pay-note { color: #c9c0b2; }

.job-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  padding: 40px 0 64px;
  align-items: start;
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 28px;
}
.fact {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 16px 18px;
}
.fact h2 { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dim); margin: 0 0 6px; font-weight: 700; }
.fact p, .fact ul { margin: 0; }
.prose h2 {
  font-family: var(--serif);
  font-size: 1.7rem;
  margin: 32px 0 12px;
}
.prose h3 { font-size: 1.1rem; margin: 22px 0 8px; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.2rem; }
.prose li { margin: 0 0 6px; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  position: relative;
  padding: 12px 0 12px 52px;
  border-top: 1px solid var(--rule);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--cream);
  display: grid; place-items: center;
  font-size: 0.85rem;
  font-weight: 650;
}

.sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 16px; }
.apply-card, .signup, .panel { padding: 22px; }
.apply-card h2, .signup h2 { font-family: var(--serif); font-size: 1.4rem; margin: 0 0 10px; }
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center;
  text-decoration: none;
  background: var(--gold);
  color: var(--ink);
  font-weight: 650;
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--gold-2); color: var(--ink); }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--navy);
  margin-top: 8px;
}
.ad-flag {
  display: inline-block;
  background: var(--burgundy);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 2px 7px;
  margin-right: 6px;
  vertical-align: middle;
}
.disclosure, .independence {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 12px 0 0;
}
.source-line {
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  margin-top: 28px;
  padding-top: 16px;
}

/* Signup */
.signup {
  background:
    linear-gradient(180deg, #173044, #10202c);
  color: var(--cream);
  border: 0;
}
.signup h2 { color: var(--cream); }
.signup p { color: #d5cdc0; }
.signup-form { display: grid; gap: 10px; margin-top: 14px; }
.signup-form input, .signup-form select {
  border: 1px solid var(--rule-dark);
  background: #0c1822;
  color: var(--cream);
  border-radius: 10px;
  padding: 12px 12px;
  font: inherit;
}
.signup-form label { font-size: 0.85rem; color: #d5cdc0; }
.signup-note { font-size: 0.8rem; color: #b9b1a4; margin: 8px 0 0; }
.signup-success { display: none; color: var(--gold-2); font-weight: 600; }

/* Platforms / guides */
.platform-grid, .guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.platform-card, .guide-card {
  padding: 22px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.platform-card:hover, .guide-card:hover { border-color: var(--gold); }
.page-hero { padding: 48px 0 12px; }
.page-title { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 12px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 44rem; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #cfc6b8;
  padding: 48px 0 28px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
.site-footer a { color: var(--gold-2); text-decoration: none; }
.site-footer h2 { font-family: var(--serif); color: var(--cream); font-size: 1.2rem; margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 8px; }
.legal { border-top: 1px solid var(--rule-dark); padding-top: 16px; font-size: 0.82rem; }

@media (max-width: 900px) {
  .card-grid, .platform-grid, .guide-grid, .job-layout, .facts, .footer-grid {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; order: -1; }
  .job-layout { display: flex; flex-direction: column; }
  .nav-toggle { display: inline-block; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 78px;
    background: var(--ink);
    flex-direction: column;
    align-items: start;
    padding: 8px 20px 20px;
    border-bottom: 1px solid var(--rule-dark);
  }
  .nav.is-open { display: flex; }

  .role-table { min-width: 0; }
  .table-wrap { background: transparent; border: 0; box-shadow: none; }
  .table-scroll { overflow: visible; }
  .role-table thead { display: none; }
  .role-table, .role-table tbody { display: block; width: 100%; }
  .role-table tbody tr {
    display: block;
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 14px 14px 14px 16px;
    margin: 0 0 10px;
    position: relative;
    border-top: 0;
  }
  .role-table tbody tr::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--gold), var(--gold-dim));
    border-radius: 14px 0 0 14px;
  }
  .role-table tbody tr:hover { background: var(--card); }
  .role-table td {
    padding: 0;
    border: 0;
    max-width: none;
  }
  .role-table td[data-label="Role"] {
    display: block;
    padding-right: 96px;
    margin-bottom: 4px;
  }
  .role-table .apply-cell {
    display: block;
    position: absolute;
    top: 14px;
    right: 12px;
    text-align: right;
  }
  .role-table .pay-cell {
    display: block;
    white-space: normal;
    font-size: 1rem;
    margin-bottom: 4px;
  }
  .role-table td[data-label="Platform"],
  .role-table td[data-label="Field"] {
    display: inline;
    color: var(--muted);
    font-size: 0.82rem;
  }
  .role-table td[data-label="Platform"]::after { content: " · "; color: var(--muted-2); }
  /* The desktop first-cell indent would push the role title out of line. */
  .role-table td:first-child { padding-left: 0; }
  .role-table td[data-label="Where"] {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.82rem;
  }
  .role-table td[data-label="Where"]::before { content: "Where: "; color: var(--muted-2); }
  .mobile-sort:not([hidden]) { display: flex; }
  .role-table .empty-row::before { display: none; }
  .role-table .empty-row td { display: block; padding: 18px 8px; }


  .hero { padding: 48px 0 42px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .section { padding: 44px 0; }
}

/* Sidebar disclosure: short, next to the button. Full text lives in the article. */
.disclosure-compact {
  margin: 12px 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}
.disclosure-compact a { color: var(--gold-dim); }
.apply-card .btn-secondary { display: flex; margin-top: 12px; }

/* Platform index: how much is actually listed here. */
.platform-count {
  margin: auto 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--gold-dim);
}

/* Guides: the listings a guide refers to. */
.related-roles {
  margin: 32px 0 0;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--gold);
  border-radius: 0 14px 14px 0;
}
.related-roles h2 {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold-dim);
  margin: 0 0 12px;
}
.related-roles ul { list-style: none; margin: 0; padding: 0; }
.related-roles li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 9px 0;
  border-top: 1px solid var(--rule);
}
.related-roles li:first-child { border-top: 0; }
.related-roles a { font-weight: 600; text-decoration: none; }
.related-roles a:hover { color: var(--gold-dim); }
.rel-pay { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.related-roles li { flex-wrap: wrap; row-gap: 2px; }

/* Sign-up: say plainly that nothing is connected yet. */
.signup .signup-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 8px 12px;
  background: rgba(212, 179, 106, 0.12);
  border: 1px solid rgba(212, 179, 106, 0.32);
  border-radius: 9px;
  font-size: 0.82rem;
  color: #f0e6d4;
}
.signup-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-2);
}
.signup-success:focus-visible { outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .role-card:hover { transform: none; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* FAQ on the homepage */
.faq-item { border-top: 1px solid var(--rule); padding: 18px 0 4px; }
.faq-item:first-of-type { border-top: 0; }
.faq-item h3 { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 6px; letter-spacing: -0.01em; }
.faq-item p { margin: 0 0 10px; color: var(--text); }
.faq .wrap > h2 { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 12px; letter-spacing: -0.02em; }

/* Short-project notice on a role page */
.closing-note {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(212, 179, 106, 0.14);
  border: 1px solid rgba(212, 179, 106, 0.4);
  color: var(--cream);
  font-size: 0.92rem;
  max-width: 46rem;
}
.closing-note.is-closed { background: rgba(122, 48, 48, 0.35); border-color: rgba(200, 120, 120, 0.5); }
.closing-chip {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--burgundy);
  vertical-align: middle;
}

/* Footer referral disclosure */
.legal p { margin: 0 0 8px; }
.footer-disclosure { color: #e8e0d2; }
.footer-disclosure .ad-flag { margin-right: 4px; }

/* Very narrow phones: the tagline wraps under the logo, so drop it. */
@media (max-width: 440px) {
  .brand-tag { display: none; }
}
