/* =====================================================================
   E12 Careers — design system
   ---------------------------------------------------------------------
   Tokens below are read out of the Figma source in envato/ (see
   design/DESIGN_SPEC.md). To re-skin, replace this block only — nothing
   further down hard-codes a brand value.
   ===================================================================== */

:root {
  /* --- brand ------------------------------------------------------- */
  --primary:        #4169E0;
  --primary-600:    #3557C4;
  --primary-700:    #2C48A6;
  --primary-tint:   rgba(65, 105, 224, .10);

  --violet:         #5215FF;
  --cyan:           #59BFFA;
  --pink:           #FF4DA2;
  --navy:           #0C1C4B;

  /* --- neutrals (template's ink ramp) ------------------------------ */
  --ink:        #252525;
  /* The source uses #7C7C7C / #BEBEBE / #A8A8A8. Anything carrying meaning is
     nudged just dark enough to clear WCAG AA against the PAGE background
     (#F7F7F7), not merely against white — most secondary text on this app sits
     outside a card. #BEBEBE survives as --ink-faint for rules and decoration,
     which convey nothing on their own. */
  --ink-2:      #717171;   /* 4.56:1 on #F7F7F7, 4.88:1 on white — secondary text */
  --ink-3:      #8F8F8F;   /* 3.02:1 on #F7F7F7 — placeholders and disabled only */
  --ink-4:      #717171;   /* inactive nav is still a link, so it clears AA too */
  --ink-faint:  #BEBEBE;   /* the source value; rules and non-text decoration only */
  --icon:       #292D32;
  --line:       #E9E9E9;
  --line-2:     #F0F0F0;
  --surface:    #FFFFFF;
  --surface-2:  #FAFAFA;
  --surface-3:  #F7F7F7;

  /* --- semantic ---------------------------------------------------- */
  /* Text weights of each semantic colour, picked to clear 4.5:1 on their own
     tint; the lighter source values survive as fills (--ok-2) where nothing
     sits on top of them. */
  --ok:      #1B6A48;
  --ok-2:    #5CB26E;
  --ok-bg:   rgba(92, 178, 110, .12);
  --warn:    #8A5600;
  --warn-bg: rgba(252, 210, 64, .16);
  --bad:     #B23434;
  --bad-bg:  rgba(235, 87, 87, .10);
  --info-bg: var(--primary-tint);

  /* --- match bands (explainable, spec §17) ------------------------- */
  --m-strong: #1B6A48;  --m-strong-bg: rgba(92, 178, 110, .14);  --m-strong-fill: #448451;
  --m-good:   #2C48A6;  --m-good-bg:   rgba(65, 105, 224, .10);  --m-good-fill:   #4169E0;
  --m-fair:   #8A5600;  --m-fair-bg:   rgba(252, 210, 64, .18);  --m-fair-fill:   #947027;
  --m-weak:   #5F5F5F;  --m-weak-bg:   #F0F0F0;                  --m-weak-fill:   #6B6B6B;

  /* --- shape ------------------------------------------------------- */
  --r-xs: 4px; --r-sm: 8px; --r: 12px; --r-lg: 14px; --r-xl: 20px;
  --r-2xl: 24px; --r-pill: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --shadow-sm: 0 1px 2px rgba(17, 17, 17, .04);
  --shadow:    0 4px 16px rgba(17, 17, 17, .08);
  --shadow-lg: 0 12px 32px rgba(17, 17, 17, .14);
  --maxw: 1440px;

  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", sans-serif;

  /* The template's signature: tight tracking everywhere but the nav. */
  --track-tight:  -.02em;
  --track-tighter:-.04em;

  /* Masthead height, so sticky offsets and toast positions follow it. */
  --header-h: 88px;
}

/* --------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink);
  background: var(--surface-3); font-size: 14px; line-height: 1.5;
  letter-spacing: var(--track-tight);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { margin: 0 0 var(--sp-3); line-height: 1.4; font-weight: 600;
              letter-spacing: var(--track-tighter); color: var(--ink); }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
p  { margin: 0 0 var(--sp-3); }
ul, ol { margin: 0 0 var(--sp-3); padding-left: 1.15em; }
small { font-size: 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-5) 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--r-xs); }

/* ------------------------------------------------------------- layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--sp-5); }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 var(--sp-5); }
.stack > * + * { margin-top: var(--sp-4); }
/* Action strips pair a .grow title with a fixed cluster of controls. Without a
   wrap the cluster takes its full min-content and squeezes .grow to zero, so the
   title renders underneath it. */
.row { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.row-nowrap { flex-wrap: nowrap; }
.row-between { display: flex; gap: var(--sp-3); align-items: center; justify-content: space-between; }
.row-wrap { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--ink-2); }
.tiny { font-size: 12px; letter-spacing: var(--track-tight); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
           overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mt-0{margin-top:0}.mt-2{margin-top:var(--sp-2)}.mt-3{margin-top:var(--sp-3)}
.mt-4{margin-top:var(--sp-4)}.mt-5{margin-top:var(--sp-5)}.mt-6{margin-top:var(--sp-6)}
.mb-0{margin-bottom:0}.mb-2{margin-bottom:var(--sp-2)}.mb-3{margin-bottom:var(--sp-3)}
.mb-4{margin-bottom:var(--sp-4)}.mb-5{margin-bottom:var(--sp-5)}
.section { padding: var(--sp-7) 0; }
.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ------------------------------------------------------------- header */
.masthead {
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.masthead-inner { display: flex; align-items: center; gap: var(--sp-6); height: 88px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 26px;
         color: var(--ink); letter-spacing: var(--track-tighter); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: var(--r-xs); display: grid; place-items: center;
  background: var(--primary); color: #fff;
  font-size: 15px; font-weight: 800; letter-spacing: -.03em;
}
.nav { display: flex; gap: var(--sp-6); align-items: center; margin-left: var(--sp-5); }
.nav a {
  color: var(--ink-4); font-weight: 600; font-size: 14px; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .04em; padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { text-decoration: none; color: var(--ink); }
.nav a.is-active { color: var(--ink); font-weight: 700; border-bottom-color: var(--primary); }
.masthead-right { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }

.seg { display: inline-flex; background: var(--surface-3); border-radius: var(--r-pill); padding: 2px; }
.mobile-bar {
  display: none; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: 10px 0; border-top: 1px solid var(--line-2);
}
.mobile-bar .nav-scroll {
  display: flex; gap: var(--sp-4); overflow-x: auto; scrollbar-width: none;
  min-width: 0; flex: 1; position: relative;
  /* fade the trailing edge so a cut-off item reads as scrollable, not broken */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
          mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
}
.mobile-bar .nav-scroll::-webkit-scrollbar { display: none; }
.mobile-bar .nav-scroll a {
  font-size: 13px; font-weight: 600; color: var(--ink-4); white-space: nowrap;
  text-transform: uppercase; letter-spacing: .04em;
}
.mobile-bar .nav-scroll a.is-active { color: var(--ink); }
.seg a {
  padding: 8px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600;
  color: var(--ink-2); white-space: nowrap;
}
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg a.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Self-hosted flag/globe marks (see market_flag()) — identical on every OS. */
.flag-icon { display: inline-block; vertical-align: -2px; margin-right: 4px; border-radius: 2px; }

.avatar-btn {
  display: flex; align-items: center; gap: var(--sp-3); padding: 0;
  border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--ink);
  cursor: pointer; font-family: inherit;
}
.avatar-btn:hover { text-decoration: none; color: var(--primary); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 700;
  letter-spacing: 0; flex: none;
}
.icon-btn {
  width: 48px; height: 48px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--surface-3); color: var(--icon); border: 0; cursor: pointer; position: relative;
  flex: none; padding: 0;
}
.icon-btn:hover { background: var(--line); text-decoration: none; }
.icon-btn.is-primary { background: var(--primary); color: #fff; }
.icon-btn.is-dark { background: var(--ink); color: #fff; }
.icon-btn .dot {
  position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--bad); border: 2px solid var(--surface);
}
.icon { width: 24px; height: 24px; flex: none; fill: currentColor; display: block; }
.icon-sm { width: 20px; height: 20px; }
.icon-xs { width: 16px; height: 16px; }
.menu { position: relative; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 234px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: var(--sp-2); display: none; z-index: 60;
}
.menu.is-open .menu-panel { display: block; }
.menu-panel a, .menu-panel button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 14px; color: var(--ink-2); background: none; border: 0; font: inherit; cursor: pointer;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.menu-sep { height: 1px; background: var(--line); margin: var(--sp-2) 0; }
.menu-head { padding: 6px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: var(--sp-2); }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 11px 20px; border-radius: var(--r); border: 1px solid transparent;
  font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
  letter-spacing: var(--track-tight);
  transition: background .12s, border-color .12s, color .12s; white-space: nowrap;
  text-decoration: none; line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn-ai { background: var(--violet); color: #fff; }
.btn-ai:hover { background: #4310d6; color: #fff; }
.btn-danger { background: var(--surface); color: var(--bad); border-color: rgba(235,87,87,.35); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { padding: 15px 28px; font-size: 16px; font-weight: 700; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* ------------------------------------------------------------- inputs */
.field { display: block; margin-bottom: var(--sp-4); }
.field > label, .label {
  display: block; font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px;
  letter-spacing: var(--track-tight);
}
.hint { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r);
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface);
  letter-spacing: var(--track-tight);
}
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23667286' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
         background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--ink-2); cursor: pointer; padding: 3px 0; }
.check input { margin: 3px 0 0; accent-color: var(--primary); flex: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.field-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }

/* -------------------------------------------------------------- cards */
.card {
  background: var(--surface); border: 0; border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(17, 17, 17, .03);
}
.card-pad { padding: var(--sp-5); }
.card-head {
  padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: var(--sp-5); }
.card-foot { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--line-2); background: var(--surface-2);
             border-radius: 0 0 var(--r) var(--r); }

/* --------------------------------------------------------- job cards */
.job-card {
  background: var(--surface); border: 1px solid transparent; border-radius: var(--r);
  padding: var(--sp-5); display: block; position: relative;
  transition: border-color .12s, box-shadow .12s;
}
.job-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.job-card.is-selected { border-color: var(--primary); box-shadow: var(--shadow); }
.job-card.is-boosted { box-shadow: inset 3px 0 0 var(--primary), 0 1px 2px rgba(17,17,17,.03); }
/* Stretched overlay link: the whole card is clickable, but real buttons inside
   it stay clickable because they sit on a higher layer. */
.job-card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.job-card-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.job-card-actions { position: relative; z-index: 2; }
.job-card-top { display: flex; gap: var(--sp-4); align-items: flex-start; }
/* The source specifies r32 on a 64px mark — i.e. a circle — and matches it in
   the detail pane, so the same company reads the same way in both places. */
.logo {
  width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid;
  place-items: center; color: #fff; font-weight: 700; font-size: 20px;
  letter-spacing: var(--track-tighter); overflow: hidden;
}
.logo-lg { width: 100px; height: 100px; font-size: 32px; border-radius: 50%; }
/* Image variants: the artwork marks/photos fill the same circle the initials use. */
.logo-img, .avatar-img { background: var(--surface); border: 1px solid var(--line-2); }
.logo-img img, .avatar-img img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.logo-img img { object-fit: contain; padding: 12%; }
.brand-lockup { height: 44px; width: auto; display: block; }
.brand-lockup-sm { height: 36px; }
.job-title { font-size: 18px; font-weight: 600; color: var(--ink); margin: 0 0 4px;
             line-height: 1.35; letter-spacing: var(--track-tighter); }
.job-card:hover .job-title { color: var(--primary); }
.job-employer { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.job-desc { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin: var(--sp-3) 0 0;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job-meta { display: flex; flex-wrap: wrap; gap: var(--sp-5); font-size: 14px;
            color: var(--ink); font-weight: 500; margin-top: var(--sp-4); }
.job-meta span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.job-meta .icon { color: var(--icon); }
.job-card-foot {
  margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}

/* ------------------------------------------------------------ badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: var(--r-lg); font-size: 12px; font-weight: 500; line-height: 1.5;
  white-space: nowrap; background: var(--line); color: var(--ink);
  letter-spacing: var(--track-tight);
}
.badge-verified { background: var(--ok-bg); color: var(--ok); }
.badge-boosted  { background: var(--primary-tint); color: var(--primary-700); }
.badge-ai       { background: rgba(82, 21, 255, .10); color: #4310D6; }
.badge-new      { background: var(--primary-tint); color: var(--primary-700); }
.badge-warn     { background: var(--warn-bg); color: var(--warn); }
.badge-danger   { background: var(--bad-bg); color: var(--bad); }
.badge-outline  { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }

/* ---------------------------------------------------- match indicator */
.match {
  display: inline-flex; align-items: center; gap: var(--sp-2); padding: 4px 12px 4px 4px;
  border-radius: var(--r-2xl); font-size: 12px; font-weight: 600;
  letter-spacing: var(--track-tight);
}
.match .match-num {
  min-width: 36px; height: 24px; border-radius: var(--r-2xl); display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; letter-spacing: -.02em;
}
/* The numeral is white, so the fill has to carry it at 4.5:1 — the band's
   lighter display colour is kept for the label beside it. */
.match-strong { background: var(--m-strong-bg); color: var(--m-strong); }
.match-strong .match-num { background: var(--m-strong-fill); }
.match-good   { background: var(--m-good-bg);   color: var(--m-good); }
.match-good .match-num   { background: var(--m-good-fill); }
.match-fair   { background: var(--m-fair-bg);   color: var(--m-fair); }
.match-fair .match-num   { background: var(--m-fair-fill); }
.match-weak   { background: var(--m-weak-bg);   color: var(--m-weak); }
.match-weak .match-num   { background: var(--m-weak-fill); }

.meter { height: 8px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--primary); }
.meter-strong > i { background: var(--m-strong-fill); }
.meter-good   > i { background: var(--m-good-fill); }
.meter-fair   > i { background: var(--m-fair-fill); }
.meter-weak   > i { background: var(--m-weak-fill); }

/* --------------------------------------------------------- AI panels */
.ai-panel {
  border: 1px solid rgba(82, 21, 255, .14); border-radius: var(--r);
  background: linear-gradient(180deg, rgba(82, 21, 255, .05), var(--surface) 140px);
  padding: var(--sp-5);
}
.ai-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.ai-dot {
  width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center;
  flex: none; background: var(--violet); color: #fff; font-size: 15px;
}
.ai-title { font-weight: 700; font-size: 16px; color: var(--violet); letter-spacing: var(--track-tighter); }
.ai-note { font-size: 12px; color: var(--ink-2); border-top: 1px solid var(--line-2);
           padding-top: var(--sp-4); margin-top: var(--sp-5); line-height: 1.55; }

.finding { display: flex; gap: var(--sp-3); align-items: flex-start; padding: 8px 0;
           font-size: 14px; line-height: 1.5; }
.finding-icon { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid;
                place-items: center; font-size: 11px; font-weight: 700; margin-top: 1px; }
.finding-strength .finding-icon { background: var(--ok-bg); color: var(--ok); }
.finding-gap .finding-icon      { background: var(--warn-bg); color: var(--warn); }
.finding-concern .finding-icon  { background: var(--bad-bg); color: var(--bad); }
.finding-question .finding-icon { background: var(--primary-tint); color: var(--primary-700); }

/* ---------------------------------------------------------- chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip {
  display: inline-flex; align-items: center; gap: var(--sp-2); padding: 9px 16px;
  border-radius: var(--r-xl); border: 0; background: var(--line);
  font-size: 14px; color: var(--ink); font-weight: 500; cursor: pointer;
  font-family: inherit; letter-spacing: var(--track-tight);
}
.chip:hover { text-decoration: none; background: #DFDFDF; }
.chip.is-on { background: var(--primary); color: #fff; }
.chip.is-on:hover { background: var(--primary-600); }
.chip-x { color: currentColor; opacity: .6; font-size: 15px; line-height: 1; }
.chip-static { cursor: default; }
.chip-static:hover { background: var(--line); }
/* The card-level tag: smaller, primary-tinted, matches the template's job tags */
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
  border-radius: var(--r-lg); background: var(--primary-tint); color: var(--primary);
  font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap;
  letter-spacing: var(--track-tight);
}
.tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* -------------------------------------------------------- search bar */
.searchbar {
  display: flex; gap: var(--sp-3); align-items: stretch;
}
.searchbar-fields {
  flex: 1; display: flex; align-items: center; background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--r); padding: 0 var(--sp-4); min-width: 0; min-height: 56px;
}
/* The fields have no chrome of their own, so the focus ring belongs to the
   group — without it the primary control of five pages has no focus indicator. */
.searchbar-fields:focus-within {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint);
}
.searchbar .sb-field { flex: 1; display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.searchbar .sb-field + .sb-field { border-left: 1px solid var(--line); padding-left: var(--sp-4); margin-left: var(--sp-4); }
.searchbar input, .searchbar select {
  border: 0; padding: 16px 0; box-shadow: none !important; background-color: transparent;
  font-size: 16px; border-radius: 0;
}
.searchbar input:focus, .searchbar select:focus { border: 0; box-shadow: none !important; }
.searchbar input::placeholder { color: var(--ink-3); }
/* keep the caret the base select rule draws, and the room it needs */
.searchbar select { padding-right: 26px; background-position: right 2px center; }
.sb-icon { color: var(--icon); flex: none; display: grid; place-items: center; }
.searchbar .btn { min-height: 56px; padding-left: 26px; padding-right: 26px; }

/* ------------------------------------------------------------- hero */
.hero {
  background:
    radial-gradient(900px 380px at 10% -10%, rgba(65,105,224,.10) 0%, transparent 62%),
    radial-gradient(760px 320px at 92% 0%, rgba(82,21,255,.08) 0%, transparent 60%),
    var(--surface);
  padding: var(--sp-8) 0 var(--sp-7);
}
.hero h1 { font-size: 44px; line-height: 1.2; letter-spacing: var(--track-tighter); max-width: 17ch; }
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: var(--sp-6); align-items: end; }
.hero-art { position: relative; align-self: stretch; min-height: 380px; }
.hero-art::before {
  content: ''; position: absolute; inset: 8% 0 0 6%;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  border-radius: var(--r-xl); transform: skewX(-6deg); opacity: .92;
}
.hero-art img {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 105%; width: auto; max-width: none;
  filter: drop-shadow(0 18px 30px rgba(12, 28, 75, .28));
}
@media (max-width: 1080px) { .hero-split { grid-template-columns: minmax(0,1fr) 300px; } }
@media (max-width: 860px)  { .hero-split { grid-template-columns: 1fr; } .hero-art { display: none; } }
.hero-lede { font-size: 16px; color: var(--ink-2); max-width: 58ch; line-height: 1.6; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2); padding: 7px 14px;
  border-radius: var(--r-xl); background: var(--primary-tint); border: 0;
  font-size: 12px; font-weight: 600; color: var(--primary); margin-bottom: var(--sp-4);
  letter-spacing: var(--track-tight);
}

/* ------------------------------------------------------ split layout */
.split { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: var(--sp-5); align-items: start; }
.split-3 { display: grid; grid-template-columns: 280px minmax(0,1fr) 452px; gap: var(--sp-5); align-items: start; }
.sticky { position: sticky; top: calc(var(--header-h, 88px) + 16px); }

.filters { background: var(--surface); border: 0; border-radius: var(--r); overflow: hidden; }
.filter-group { border-bottom: 1px solid var(--line-2); }
.filter-group:last-child { border-bottom: 0; }
.filter-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--sp-5); background: none; border: 0; font: inherit; font-size: 16px;
  font-weight: 600; color: var(--ink); cursor: pointer; letter-spacing: var(--track-tight);
}
.filter-body { padding: 0 var(--sp-5) var(--sp-5); }
.filter-group.is-collapsed .filter-body { display: none; }
.filter-caret { color: var(--ink-4); transition: transform .15s; }
.filter-group.is-collapsed .filter-caret { transform: rotate(-90deg); }

/* -------------------------------------------------------------- misc */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
.stat { background: var(--surface); border: 0; border-radius: var(--r); padding: var(--sp-5); }
.stat-label { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.stat-value { font-size: 32px; font-weight: 600; letter-spacing: var(--track-tighter);
              margin-top: 4px; line-height: 1.2; }
.stat-delta { font-size: 12px; font-weight: 500; color: var(--ink-2); }
/* The template's compact three-up detail row: small grey label over a value */
.factrow { display: flex; gap: var(--sp-1); }
.fact { flex: 1; padding: var(--sp-3) 0; }
.fact + .fact { border-left: 1px solid var(--line); padding-left: var(--sp-4); }
.fact-label { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.fact-value { font-size: 16px; color: var(--ink); font-weight: 500; margin-top: 6px; }

.tabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-5); overflow-x: auto; }
.tabs a {
  padding: 12px 2px; margin-right: var(--sp-5); font-size: 14px; font-weight: 600;
  color: var(--ink-4); border-bottom: 2px solid transparent; white-space: nowrap;
  letter-spacing: var(--track-tight);
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.is-active { color: var(--ink); font-weight: 700; border-bottom-color: var(--primary); }

/* Tables carry more columns than a phone has room for; they scroll inside their
   own container rather than widening the page. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-4); font-weight: 700; padding: 12px var(--sp-4); border-bottom: 1px solid var(--line);
}
.table td { padding: 16px var(--sp-4); border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-hover tbody tr:hover { background: var(--surface-2); }

.empty { text-align: center; padding: var(--sp-8) var(--sp-5); color: var(--ink-2); }
.empty-icon {
  width: 56px; height: 56px; margin: 0 auto var(--sp-4); border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-3); color: var(--ink-3);
}
.empty-icon .icon { width: 26px; height: 26px; }
.empty h3 { color: var(--ink); }

.alert {
  padding: var(--sp-4); border-radius: var(--r); font-size: 14px; line-height: 1.5;
  border: 1px solid; display: flex; gap: var(--sp-3); align-items: flex-start;
}
.alert-ok   { background: var(--ok-bg);   border-color: rgba(38,141,97,.22);  color: #1B6A48; }
.alert-info { background: var(--info-bg); border-color: rgba(65,105,224,.22); color: var(--primary-700); }
.alert-warn { background: var(--warn-bg); border-color: rgba(178,110,0,.22);  color: #8A5600; }
.alert-bad  { background: var(--bad-bg);  border-color: rgba(235,87,87,.28);  color: #B23434; }

/* Sits clear of the masthead, whose height differs between desktop and mobile. */
.flashes {
  position: fixed; top: calc(var(--header-h, 88px) + 12px); right: 24px; z-index: 80;
  display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px));
}
.flashes .alert { box-shadow: var(--shadow-lg); background: var(--surface); }

.pipeline { display: flex; gap: 2px; flex-wrap: wrap; }
.pipeline-step {
  flex: 1 1 auto; min-width: 86px; text-align: center; padding: 10px 6px;
  font-size: 12px; font-weight: 600;
  background: var(--surface-3); color: var(--ink-2); letter-spacing: var(--track-tight);
}
.pipeline-step:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.pipeline-step:last-child  { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.pipeline-step.is-done { background: var(--primary-tint); color: var(--primary); }
.pipeline-step.is-now  { background: var(--primary); color: #fff; }
.pipeline-step.is-bad  { background: var(--bad-bg); color: var(--bad); }

.timeline { border-left: 2px solid var(--line); padding-left: var(--sp-4); margin-left: 6px; }
.timeline-item { position: relative; padding-bottom: var(--sp-4); }
.timeline-item::before {
  content: ''; position: absolute; left: calc(-1 * var(--sp-4) - 7px); top: 6px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface);
}

.prose { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.prose h3 { color: var(--ink); margin-top: var(--sp-5); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 5px; }
.prose p:last-child { margin-bottom: 0; }

.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.bar { flex: 1; background: var(--primary-tint); border-radius: var(--r-xs) var(--r-xs) 0 0; position: relative; min-height: 2px; }
.bar > i { position: absolute; inset: auto 0 0 0; background: var(--primary); border-radius: var(--r-xs) var(--r-xs) 0 0; display: block; }

.industry-tile {
  display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5);
  background: var(--surface); border: 1px solid transparent; border-radius: var(--r);
  transition: border-color .12s, transform .12s;
}
.industry-tile:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-2px); }
.industry-icon { width: 48px; height: 48px; border-radius: var(--r-sm); background: var(--surface-3);
                 display: grid; place-items: center; font-size: 20px; flex: none; }
.industry-name { font-weight: 600; color: var(--ink); font-size: 16px; letter-spacing: var(--track-tight);
                 display: block; overflow-wrap: break-word; hyphens: auto; }
.industry-tile > .grow { min-width: 0; }

/* -------------------------------------------------- profile cover band */
.cover-band {
  height: 168px; border-radius: var(--r) var(--r) 0 0; overflow: hidden; position: relative;
  background: var(--primary-tint);
}
.cover-band img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* -------------------------------------------------- donut (applicants) */
.donut { position: relative; width: 158px; height: 158px; flex: none; }
.donut svg { transform: rotate(-90deg); display: block; }
.donut-centre {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
}
.donut-value { font-size: 32px; font-weight: 600; letter-spacing: var(--track-tighter); line-height: 1; }
.donut-total { font-size: 16px; font-weight: 500; color: var(--ink-2); }
.legend { display: grid; gap: var(--sp-3); }
.legend-item { display: flex; align-items: center; gap: var(--sp-2); font-size: 13px; color: var(--ink-2); }
.legend-swatch { width: 12px; height: 12px; border-radius: var(--r-xs); flex: none; }

.pager { display: flex; gap: var(--sp-2); justify-content: center; align-items: center; margin-top: var(--sp-6); }
.pager a, .pager span {
  padding: 9px 15px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.pager a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pager .is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager .is-off { opacity: .45; pointer-events: none; }

.site-foot { background: var(--navy); color: #A9B4CE; margin-top: var(--sp-8); padding: var(--sp-7) 0 var(--sp-5); }
.site-foot a { color: #DCE3F2; font-size: 14px; }
.site-foot h4 { color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.site-foot .foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--sp-5); }
.site-foot ul { list-style: none; padding: 0; }
.site-foot li { margin-bottom: 7px; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.11); margin-top: var(--sp-5); padding-top: var(--sp-4);
               display: flex; justify-content: space-between; gap: var(--sp-4); font-size: 12px; flex-wrap: wrap; }

.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--line-2) 37%, var(--surface-3) 63%);
            background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: var(--r-sm); }
@keyframes sk { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor;
        border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }

/* --------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .split-3 { grid-template-columns: 260px minmax(0,1fr) !important; }
  .split-3 > .detail-pane { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
/* The 88px bar carries brand + four nav items + market selector + auth actions.
   Below 1080 that no longer fits on one row, so the nav and the market selector
   move to a second row rather than pushing the page wider than the viewport. */
@media (max-width: 1080px) {
  :root { --header-h: 126px; }   /* 72px bar + the 54px nav row */
  .nav { display: none; }
  .masthead-inner { height: 72px; gap: var(--sp-4); }
  .brand { font-size: 22px; gap: 8px; }
  .brand-mark { width: 36px; height: 36px; font-size: 13px; }
  .masthead-right { gap: var(--sp-2); min-width: 0; }
  .masthead-right .seg { display: none; }
  .avatar { width: 36px; height: 36px; font-size: 13px; }
  .mobile-bar { display: flex; }
}
@media (max-width: 860px) {
  .split, .split-3 { grid-template-columns: minmax(0, 1fr) !important; }
  :root { --header-h: 122px; }
  .masthead-inner { height: 68px; gap: var(--sp-3); }
  .brand { font-size: 20px; }
  .brand-mark { width: 32px; height: 32px; font-size: 12px; }
  .masthead-right .icon-btn { width: 40px; height: 40px; }
  .avatar { width: 34px; height: 34px; font-size: 12px; }
  .sticky { position: static; }
  .filters { position: static; }
  .hero { padding: var(--sp-6) 0; }
  .hero h1 { font-size: 30px; }
  /* Fields stack rather than compete for a phone's width; the divider rotates
     from a vertical rule to a horizontal one. */
  .searchbar { flex-direction: column; align-items: stretch; }
  .searchbar-fields { flex-direction: column; align-items: stretch; padding: var(--sp-2) var(--sp-4); }
  .searchbar .sb-field + .sb-field {
    border-left: 0; border-top: 1px solid var(--line);
    padding-left: 0; margin-left: 0; padding-top: var(--sp-2); margin-top: var(--sp-2);
  }
  .searchbar input, .searchbar select { padding: 12px 0; font-size: 16px; }
  .searchbar .btn { min-height: 52px; }
  /* Several pages cap a field's width inline for the desktop bar; stacked, those
     caps just draw ragged dividers. */
  .searchbar .sb-field { max-width: none !important; }
  /* Filters sit above the results on a narrow screen, so they open collapsed. */
  .filters .filter-group.is-collapsed .filter-body { display: none; }
  /* A bare 1fr track resolves min-width:auto, so a wide card still overflows it. */
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .field-row, .field-row-3 { grid-template-columns: minmax(0, 1fr); }
  .site-foot .foot-grid { grid-template-columns: 1fr 1fr; }

  /* Touch targets: the mobile nav and the filter rows are the primary controls
     on a phone and were 20–27px tall. */
  .mobile-bar .nav-scroll a { padding: 11px 0; }
  .mobile-bar .seg a { padding: 10px 14px; }
  .filters a.check, .filters label.check { min-height: 44px; align-items: center; }
  .btn-sm { padding: 11px 16px; }
  .masthead-right .icon-btn { width: 44px; height: 44px; }
  .avatar-btn { min-height: 44px; }
  select, input[type=text], input[type=email], input[type=password],
  input[type=number], input[type=url], input[type=date], input[type=datetime-local], input[type=search] { min-height: 44px; }
}
@media (max-width: 560px) {
  .grid-4, .stat-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  /* Text-heavy cards (the pricing tiers) need the full width at this size. */
  .grid-4.grid-cards { grid-template-columns: minmax(0, 1fr); }
  .industry-tile { padding: var(--sp-3) var(--sp-3); gap: var(--sp-3); }
  .industry-icon { width: 36px; height: 36px; font-size: 17px; }
  .industry-name { font-size: 13px; }
  .job-meta { gap: var(--sp-3) var(--sp-4); font-size: 13px; }
  .factrow { flex-wrap: wrap; }
  .fact { flex: 1 1 45%; }
  .fact + .fact { border-left: 0; padding-left: 0; }
  .wrap, .wrap-narrow { padding: 0 var(--sp-4); }
  .masthead-inner { gap: var(--sp-3); }
  h1 { font-size: 24px; }
}
@media print {
  .masthead, .site-foot, .btn, .filters { display: none !important; }
  body { background: #fff; }
}

/* ------------------------------------------------------------------ i18n --
   CJK pages: the template's tight Latin tracking squashes Chinese glyphs,
   so both tracking tokens relax when the page language is Chinese. The
   Simplified page also prefers SC-flavoured fonts. */
html[lang^="zh"] {
  --track-tight: 0;
  --track-tighter: -.01em;
}
html[lang="zh-Hans"] {
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
/* A Simplified label on a Traditional page (the language switcher) still
   needs an SC-capable fallback for glyphs TC fonts lack (e.g. 简). */
[lang="zh-Hans"] {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
