/* ============================================================
   CAREER EXPLORER — /careers

   Built from the "careers (5).html" suggestion, in the site's own
   palette and type rather than its emerald-and-Bodoni one. The ideas
   taken from it: a command bar that pins while you scroll, real
   dropdowns instead of native selects, a card/table switch, active
   filters as removable chips, and a results header that counts.

   ONE DOM, TWO VIEWS.
   The card and the table are the same markup. Each item is a CSS grid;
   .cx.is-table gives it six aligned columns and shows a header strip
   above, .cx.is-cards collapses it to one column inside a card. Two
   sets of markup for 345 careers would double the page and drift the
   moment either was edited.

   Everything is scoped under .cx.
   ============================================================ */

.cx{
  --cx-line:var(--line);
  --cx-line-2:var(--line-2);
  --cx-radius:14px;
  --cx-shadow:19,27,46;
}
.cx *{box-sizing:border-box}

/* ---------------- hero ----------------

   The old directory hero was light paper like every band under it, so the
   page opened with nothing to look at and the eye had no landing point. This
   is a dark ink block: the site's own --ink deepened, with the notebook grid
   showing through it, a saffron glow off the top corner and the figures in
   saffron. Saffron and the verify green are the site's accents, so this is
   loud without being a new palette.

   The command bar below overlaps its bottom edge, which is what ties the two
   into one masthead instead of two stacked strips. */
.cx-hero{
  position:relative;overflow:hidden;color:#eef1f7;
  background:
    radial-gradient(120% 130% at 84% -16%, rgba(239,139,0,.30), rgba(239,139,0,0) 56%),
    radial-gradient(90% 120% at 8% 110%, rgba(27,63,196,.34), rgba(27,63,196,0) 60%),
    linear-gradient(158deg, #1b2540, #0d1322 68%);
  padding:56px 0 82px;
}
.cx-hero::before{
  content:"";position:absolute;inset:0;pointer-events:none;opacity:.55;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,255,255,.075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.075) 1px, transparent 1px);
  background-size:26px 26px,26px 26px,130px 130px,130px 130px;
}
.cx-hero-in{position:relative;z-index:1;display:grid;gap:46px;grid-template-columns:1.15fr .85fr;align-items:end}

.cx-eyebrow{
  display:inline-flex;align-items:center;gap:9px;margin:0;
  font-family:var(--f-data);font-size:10.5px;font-weight:500;
  letter-spacing:.2em;text-transform:uppercase;color:#f0b45f;
}
.cx-eyebrow i{
  width:6px;height:6px;border-radius:50%;background:#4ad3a0;
  box-shadow:0 0 0 3px rgba(74,211,160,.2);
}
.cx-hero h1{
  margin:20px 0 0;font-family:var(--f-display);font-weight:800;
  font-size:clamp(32px,4.6vw,56px);line-height:1.03;letter-spacing:-.035em;
  color:#fbfaf7;max-width:20ch;text-wrap:balance;
}
.cx-hero h1 em{font-style:normal;color:#7fe3bd}
.cx-hero-lede{
  margin:18px 0 0;max-width:54ch;font-size:16px;line-height:1.62;
  color:rgba(238,241,247,.72);
}
.cx-hero-lede b{color:#fbfaf7;font-weight:600}

/* Figures, not a card. A panel here would compete with the command bar
   sitting on top of it. */
.cx-figs{display:flex;flex-wrap:wrap;gap:0;margin:0;padding:0}
.cx-figs > div{
  padding:0 26px 0 0;margin-right:26px;border-right:1px solid rgba(255,255,255,.15);
}
.cx-figs > div:last-child{border-right:0;margin-right:0;padding-right:0}
.cx-figs dt{
  margin:0;font-family:var(--f-data);font-size:10px;letter-spacing:.16em;
  text-transform:uppercase;color:rgba(238,241,247,.5);
}
.cx-figs dd{
  margin:8px 0 0;font-family:var(--f-display);font-size:34px;font-weight:800;
  letter-spacing:-.035em;line-height:1;color:#f0b45f;font-variant-numeric:tabular-nums;
}

/* The field swatches, doubling as the hero's colour. Shows what the
   directory is made of before you have filtered anything. */
.cx-hero-fields{
  display:flex;flex-wrap:wrap;gap:7px;margin:26px 0 0;
}
.cx-hero-fields a{
  display:inline-flex;align-items:center;gap:7px;
  font-size:12.5px;color:rgba(238,241,247,.82);
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);
  border-radius:20px;padding:5px 12px;
  transition:background .16s ease,border-color .16s ease,color .16s ease;
}
.cx-hero-fields a i{width:7px;height:7px;border-radius:2px;background:var(--d);flex:0 0 auto}
.cx-hero-fields a:hover{background:rgba(255,255,255,.13);border-color:rgba(255,255,255,.3);color:#fff}
.cx-hero-fields a[aria-current]{background:#fbfaf7;border-color:#fbfaf7;color:#131b2e;font-weight:600}

/* ---------------- command bar ----------------
   Pinned under the site header, whose live height site.js publishes as
   --icg-head-h. It carries search, the two filters, sort and the view
   switch: everything that changes what you are looking at, in one rail
   that never leaves. */
.cx-bar-hold{position:relative;z-index:30;margin-top:-38px}
.cx-bar{
  position:sticky;top:calc(var(--icg-head-h,0px) + 10px);
  display:flex;align-items:stretch;flex-wrap:wrap;
  background:var(--card);border:1px solid var(--cx-line);border-radius:var(--cx-radius);
  box-shadow:0 2px 4px rgba(var(--cx-shadow),.05),0 26px 44px -30px rgba(var(--cx-shadow),.5);
}
.cx-bar > *{border-left:1px solid var(--cx-line-2)}
.cx-bar > *:first-child{border-left:0}

.cx-search{flex:1 1 280px;min-width:0;position:relative;display:flex;align-items:center}
.cx-search svg{
  position:absolute;left:17px;width:16px;height:16px;color:var(--faint);
  fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;pointer-events:none;
}
.cx-search input{
  width:100%;border:0;background:none;font:inherit;font-size:15px;color:var(--ink);
  padding:17px 14px 17px 45px;border-radius:var(--cx-radius) 0 0 var(--cx-radius);
}
.cx-search input::placeholder{color:var(--faint)}
.cx-search input:focus{outline:0}

.cx-submit{border-left:1px solid var(--cx-line-2);padding:8px;display:flex}
.cx-submit button{
  align-self:stretch;font:inherit;font-size:14.5px;font-weight:600;letter-spacing:-.01em;
  cursor:pointer;background:var(--blue);color:#fff;border:0;border-radius:10px;padding:0 24px;
  white-space:nowrap;transition:background .14s ease,transform .08s ease;
}
.cx-submit button:hover{background:#16349f}
.cx-submit button:active{transform:translateY(1px)}

/* ---------------- dropdown ----------------
   A button plus a listbox, not a <select>. The native control cannot show
   a count beside each option or a label above the value, and styles
   differently on every platform - which is most of what made the old
   filter row look unfinished. Keyboard behaviour is implemented to match:
   arrows move, Enter picks, Escape closes, focus returns to the button. */
.cx-dd{position:relative;flex:0 1 210px;min-width:150px;display:flex}
.cx-dd-btn{
  flex:1 1 auto;min-width:0;text-align:left;background:none;border:0;cursor:pointer;
  padding:10px 32px 11px 16px;font:inherit;position:relative;color:var(--ink);
  transition:background .14s ease;
}
.cx-dd-btn:hover{background:var(--paper)}
.cx-dd-btn .l{
  display:block;font-family:var(--f-data);font-size:9.5px;letter-spacing:.15em;
  text-transform:uppercase;color:var(--muted);margin-bottom:2px;
}
.cx-dd-btn .v{
  display:block;font-size:14.5px;font-weight:500;color:var(--ink);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.cx-dd-btn::after{
  content:"";position:absolute;right:15px;top:calc(50% - 2px);
  border:4px solid transparent;border-top-color:var(--muted);
}
.cx-dd[aria-expanded="true"] .cx-dd-btn{background:var(--paper)}
.cx-dd[aria-expanded="true"] .cx-dd-btn::after{transform:rotate(180deg);transform-origin:50% 25%}

.cx-dd-list{
  position:absolute;top:calc(100% + 7px);left:0;min-width:100%;width:max-content;max-width:330px;
  max-height:340px;overflow:auto;z-index:40;
  background:var(--card);border:1px solid var(--cx-line);border-radius:12px;
  box-shadow:0 2px 4px rgba(var(--cx-shadow),.05),0 24px 40px -22px rgba(var(--cx-shadow),.45);
  padding:6px;margin:0;list-style:none;display:none;
}
.cx-dd[aria-expanded="true"] .cx-dd-list{display:block}
.cx-dd-opt{
  display:flex;align-items:center;gap:10px;width:100%;text-align:left;
  background:none;border:0;cursor:pointer;font:inherit;font-size:14px;color:var(--ink-2);
  padding:8px 10px;border-radius:8px;
}
.cx-dd-opt:hover,.cx-dd-opt.is-cursor{background:var(--blue-soft);color:var(--blue)}
.cx-dd-opt[aria-selected="true"]{color:var(--ink);font-weight:600}
.cx-dd-opt[aria-selected="true"]::after{content:"✓";margin-left:auto;color:var(--blue)}
.cx-dd-opt .n{
  margin-left:auto;font-family:var(--f-data);font-size:11px;color:var(--faint);
  font-variant-numeric:tabular-nums;
}
.cx-dd-opt[aria-selected="true"] .n{margin-left:0}

/* ---------------- results header ---------------- */
.cx-head{
  display:flex;align-items:flex-end;gap:20px;flex-wrap:wrap;
  margin:34px 0 0;
}
.cx-head h2{
  margin:4px 0 0;font-family:var(--f-display);font-size:clamp(22px,2.4vw,30px);
  font-weight:800;letter-spacing:-.03em;line-height:1.1;
}
.cx-head h2 span{color:var(--muted);font-weight:600}
.cx-head .icg-eyebrow{
  display:inline-flex;align-items:center;gap:8px;margin:0;
  font-family:var(--f-data);font-size:10.5px;font-weight:500;
  letter-spacing:.16em;text-transform:uppercase;color:var(--muted);
}
.cx-head .icg-eyebrow::before{
  content:"";width:16px;height:1px;background:var(--line);flex:0 0 auto;
}

/* The controls sit hard right, and the view switch is the last thing in the
   row - it is a mode, not a filter, so it belongs at the end of the line. */
.cx-tools{
  display:flex;align-items:center;justify-content:flex-end;gap:10px;
  margin-left:auto;flex-wrap:wrap;
}
.cx-views{margin-left:2px}

/* A dropdown outside the command bar has no dividers to sit between, so it
   needs its own box. Without this the sort control read as loose text next to
   a bordered switch, which is what made that corner look unfinished. */
.cx-dd--boxed{
  flex:0 0 auto;min-width:0;
  background:var(--card);border:1px solid var(--cx-line);border-radius:10px;
}
.cx-dd--boxed .cx-dd-btn{padding:7px 30px 7px 13px;border-radius:10px}
.cx-dd--boxed .cx-dd-btn .l{font-size:9px;letter-spacing:.14em;margin-bottom:1px}
.cx-dd--boxed .cx-dd-btn .v{font-size:13px;font-weight:600}
.cx-dd--boxed .cx-dd-btn::after{right:12px}
.cx-dd--boxed .cx-dd-list{left:auto;right:0}

.cx-views{display:flex;background:var(--card);border:1px solid var(--cx-line);border-radius:10px;overflow:hidden}
.cx-views button{
  display:flex;align-items:center;gap:7px;background:none;border:0;cursor:pointer;
  font-family:var(--f-data);font-size:11px;letter-spacing:.04em;color:var(--muted);
  padding:9px 13px;transition:background .14s ease,color .14s ease;
}
.cx-views button + button{border-left:1px solid var(--cx-line-2)}
.cx-views button svg{width:13px;height:13px;fill:currentColor}
.cx-views button:hover{color:var(--ink)}
.cx-views button[aria-pressed="true"]{background:var(--ink);color:#fff}

/* ---------------- active filters ---------------- */
.cx-chips{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 0}
.cx-chips:empty{display:none}
.cx-chip{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--blue-soft);color:var(--blue);border:1px solid rgba(27,63,196,.18);
  border-radius:20px;padding:5px 6px 5px 12px;font-size:12.5px;
}
.cx-chip b{font-weight:600}
.cx-chip a{
  display:grid;place-items:center;width:18px;height:18px;border-radius:50%;
  background:rgba(27,63,196,.1);color:inherit;font-size:12px;line-height:1;
}
.cx-chip a:hover{background:var(--blue);color:#fff}
.cx-chip--clear{background:none;color:var(--muted);border-color:var(--cx-line)}
.cx-chip--clear:hover{color:var(--ink);border-color:var(--muted)}

/* ---------------- the list ---------------- */
.cx-list{margin:20px 0 0}

/* Table header. Only drawn in table mode, and only wide enough for it. */
.cx-thead{
  display:none;gap:18px;align-items:end;padding:0 18px 10px;
  font-family:var(--f-data);font-size:10px;letter-spacing:.13em;
  text-transform:uppercase;color:var(--muted);border-bottom:1px solid var(--cx-line);
}
.cx-thead span{min-width:0}

/* Every item carries its field's colour on its leading edge - the same eight
   colours the path finder and the home page use for the same fields. It is
   what makes a wall of 345 rows scannable by field without reading a word,
   and it is where most of the page's colour now comes from. */
.cx-item{
  position:relative;display:grid;gap:14px;overflow:hidden;
  background:var(--card);border:1px solid var(--cx-line);
}
.cx-item::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:4px;
  background:var(--d,var(--cx-line));
}
.cx-item.is-out{display:none}
.cx-c{min-width:0}
.cx-name h3{
  margin:0;font-family:var(--f-display);font-size:16.5px;font-weight:700;
  letter-spacing:-.022em;line-height:1.3;
}
.cx-name h3 a{color:var(--ink)}
.cx-name h3 a:hover{color:var(--blue)}
.cx-sum{
  margin:6px 0 0;font-size:13.5px;line-height:1.55;color:var(--ink-2);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
/* ---------- one hue per kind of information ----------

   Four kinds of thing sit in every item, and before this they were four
   shades of grey: the reader had to parse each one to know which was which.
   Now each carries its own tint, consistently, in both views:

     field    the field's own colour, from --d / --dr
     setting  warm sand - it describes a place, not a qualification
     skills   blue, the site's link and action hue
     routes   green, the same --verify that means "this is a real path"

   All four are one step off white. They are there to be recognised at a
   glance, not read as decoration. */

.cx-k{
  display:none;font-family:var(--f-data);font-size:9px;font-weight:500;
  letter-spacing:.15em;text-transform:uppercase;color:var(--faint);
  margin-bottom:7px;
}

.cx-field{
  display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;
  color:var(--d,var(--ink-2));
  background:rgba(var(--dr,120,113,108),.075);
  border:1px solid rgba(var(--dr,120,113,108),.2);
  border-radius:20px;padding:3px 11px 3px 9px;
}
.cx-field i{width:7px;height:7px;border-radius:2px;background:var(--d,var(--muted));flex:0 0 auto}

.cx-set{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.cx-setting{
  font-size:12.5px;color:#8a5a12;
  background:#fdf6e9;border:1px solid rgba(180,83,9,.18);
  border-radius:7px;padding:2px 9px;
}
.cx-remote{
  font-family:var(--f-data);font-size:10px;letter-spacing:.05em;
  color:var(--verify);background:#eff8f3;border:1px solid rgba(14,138,95,.25);
  border-radius:20px;padding:2px 9px;
}

.cx-tags{display:flex;flex-wrap:wrap;gap:6px}
.cx-tags em{
  font-style:normal;font-size:11.5px;font-weight:500;color:var(--blue);
  background:var(--blue-soft);border:1px solid rgba(27,63,196,.16);
  border-radius:7px;padding:2px 9px;
}

.cx-route-list{display:flex;flex-wrap:wrap;gap:6px}
.cx-route-list em{
  font-style:normal;font-size:11.5px;font-weight:500;color:#0b6b4f;
  background:#eff8f3;border:1px solid rgba(14,138,95,.2);
  border-radius:7px;padding:2px 9px;
}
/* The overflow counter is deliberately quiet in both groups - it is a number,
   not another value. */
.cx-tags em.cx-more,.cx-route-list em.cx-more{
  color:var(--muted);background:var(--paper);border-color:var(--cx-line);font-weight:600;
  font-variant-numeric:tabular-nums;
}
.cx-go-link{
  display:inline-flex;align-items:center;gap:7px;white-space:nowrap;
  font-family:var(--f-data);font-size:11px;letter-spacing:.04em;color:var(--blue);
}
.cx-go-link svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2.2;
  stroke-linecap:round;stroke-linejoin:round;transition:transform .18s ease}
.cx-item:hover .cx-go-link svg{transform:translateX(3px)}

/* ---------- card mode ---------- */
.cx.is-cards .cx-list{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.cx.is-cards .cx-item{
  grid-template-columns:1fr;align-content:start;
  border-radius:var(--cx-radius);padding:20px 20px 20px 24px;
  box-shadow:0 1px 1px rgba(var(--cx-shadow),.03);
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
/* Hover borrows the field colour rather than a generic grey, so the card that
   lifts is visibly part of a family. */
.cx.is-cards .cx-item:hover{
  transform:translateY(-3px);border-color:var(--d,#d5daea);
  box-shadow:0 2px 4px rgba(var(--cx-shadow),.04),0 20px 34px -20px rgba(var(--cx-shadow),.4);
}
/* A tinted title band, so the field reads before the eye reaches the swatch. */
.cx.is-cards .cx-item::after{
  content:"";position:absolute;left:0;right:0;top:0;height:78px;pointer-events:none;
  background:linear-gradient(var(--d,transparent),transparent);opacity:.055;
}
.cx.is-cards .cx-c--go{margin-top:auto;padding-top:14px;border-top:1px solid var(--cx-line-2)}
/* The card has no header strip, so each section names itself. */
.cx.is-cards .cx-k{display:block}
/* Hairlines between sections, so a card reads as parts rather than a pile. */
.cx.is-cards .cx-item > .cx-c + .cx-c{padding-top:14px;border-top:1px solid var(--cx-line-2)}
.cx.is-cards .cx-item > .cx-c--go{border-top:1px solid var(--cx-line-2)}
.cx.is-cards .cx-item{gap:0}

/* A cell with nothing in it still holds its place in the table, because the
   columns have to line up down the page. In a card it is just a gap, so it
   collapses. The server marks them - Razor's whitespace means :empty never
   matches. */
.cx.is-cards .cx-c--none{display:none}

/* [hidden] is a UA rule and loses to the display:grid above, so the script's
   hide would do nothing without this. */
.cx .cx-list[hidden]{display:none}

/* ---------- table mode ---------- */
.cx.is-table .cx-thead{display:grid}
.cx.is-table .cx-thead,
.cx.is-table .cx-item{grid-template-columns:minmax(0,2.3fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.5fr) minmax(0,1.2fr) auto}
.cx.is-table .cx-item{
  align-items:center;padding:15px 18px 15px 22px;border-radius:0;
  border-left:0;border-right:0;border-top:0;
  transition:background .14s ease;
}
.cx.is-table .cx-item:hover{background:var(--paper)}
/* A thinner edge in the table - at 45px tall a 4px bar reads as a block of
   colour rather than a marker. */
.cx.is-table .cx-item::before{width:3px;top:0;bottom:0}
.cx.is-table .cx-name h3{font-size:15px}
.cx.is-table .cx-sum{-webkit-line-clamp:1;font-size:12.5px;margin-top:3px}
.cx.is-table .cx-tags em{font-size:11px}

.cx-empty{
  margin:22px 0 0;padding:44px 24px;text-align:center;
  background:var(--card);border:1px dashed var(--cx-line);border-radius:var(--cx-radius);
}
.cx-empty h3{margin:0;font-family:var(--f-display);font-size:19px;font-weight:700;letter-spacing:-.02em}
.cx-empty p{margin:8px 0 16px;color:var(--ink-2);font-size:14.5px}

.cx-note{
  margin:28px 0 0;padding-top:16px;border-top:1px solid var(--cx-line);
  font-size:12.5px;line-height:1.6;color:var(--muted);
}
.cx-note b{color:var(--ink-2);font-weight:600}

@media (max-width:1080px){
  .cx.is-cards .cx-list{grid-template-columns:repeat(2,1fr)}
  /* Six columns stop being readable well before the phone breakpoint, so the
     table folds back into cards rather than becoming a horizontal scroll. */
  .cx.is-table .cx-thead{display:none}
  .cx.is-table .cx-list{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
  .cx.is-table .cx-item{
    grid-template-columns:1fr;border:1px solid var(--cx-line);
    border-radius:var(--cx-radius);padding:20px 20px 20px 24px;gap:14px;
  }
  /* Once it is a card it needs the card's treatment too: the wider leading
     edge, the title tint, and empty cells collapsed rather than left as gaps. */
  .cx.is-table .cx-item::before{width:4px}
  .cx.is-table .cx-item::after{
    content:"";position:absolute;left:0;right:0;top:0;height:78px;pointer-events:none;
    background:linear-gradient(var(--d,transparent),transparent);opacity:.055;
  }
  .cx.is-table .cx-item:hover{background:var(--card);border-color:var(--d,#d5daea)}
  .cx.is-table .cx-c--none{display:none}
  .cx.is-table .cx-sum{-webkit-line-clamp:2}
  /* Same as a real card: labelled sections, divided by hairlines. */
  .cx.is-table .cx-k{display:block}
  .cx.is-table .cx-item{gap:0}
  .cx.is-table .cx-item > .cx-c + .cx-c{padding-top:14px;border-top:1px solid var(--cx-line-2)}
  .cx.is-table .cx-name h3{font-size:16.5px}
  .cx.is-table .cx-tags em,.cx.is-table .cx-route-list em{font-size:11.5px}
}
@media (max-width:960px){
  /* The figures move under the copy rather than shrinking beside it. */
  .cx-hero-in{grid-template-columns:1fr;gap:32px;align-items:start}
  .cx-hero{padding:44px 0 76px}
}
@media (max-width:720px){
  .cx.is-cards .cx-list,.cx.is-table .cx-list{grid-template-columns:1fr}
  .cx-hero{padding:34px 0 70px}
  .cx-figs > div{padding-right:18px;margin-right:18px}
  .cx-figs dd{font-size:27px}
  .cx-hero-fields{gap:6px}
  .cx-hero-fields a{font-size:12px;padding:4px 10px}
  .cx-bar{flex-direction:column}
  .cx-bar > *{border-left:0;border-top:1px solid var(--cx-line-2)}
  .cx-bar > *:first-child{border-top:0}
  .cx-search input{border-radius:var(--cx-radius) var(--cx-radius) 0 0}
  .cx-dd{flex:1 1 auto}
  .cx-go button{width:100%;padding:13px 24px}
  .cx-head{margin-top:26px}
  .cx-tools{margin-left:0;width:100%}
}
@media (prefers-reduced-motion:reduce){
  .cx *{transition:none!important}
  .cx.is-cards .cx-item:hover{transform:none}
}
