/* Freetrade x Ashby — Dark Mode (allowed classes only, fixed) */

/* 1) Token fallbacks (work inside iframe even if site vars aren't present) */
:root{
  --freetrade-black:#0b0b0c;
  --off-black:#111214;
  --freetrade-white:#ffffff;
  --freetrade-pink:#ff97d6;            /* text links */
  --button-purple:#8f4dfe;             /* buttons */
  --darkest-grey:#2a2d32;
  --_tokens-colour---text--secondary:#c0c4cc;
  --dm-sans:"DM Sans",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --dm-mono:"DM Mono",ui-monospace,"SFMono-Regular",Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
}

/* 2) Override Ashby vars used by their base body rule (forces dark) */
:root{
  --colorAppBackground:var(--freetrade-black);
  --colorNeutral000:var(--freetrade-black);
  --colorNeutral800:var(--_tokens-colour---text--secondary);
  --colorNeutral100:var(--off-black);
}

/* 3) Document base */
html,body{
  background-color:var(--colorAppBackground) !important;
  color:var(--_tokens-colour---text--secondary) !important;
  font-family:var(--dm-sans);
  font-size:16px;
}

/* 4) Headings (color only here; detailed type set per-element below) */
.ashby-job-board-heading,
.ashby-job-board-heading-count,
.ashby-department-heading,
.ashby-department-heading-level,
.ashby-job-posting-brief-title,
.ashby-job-posting-heading,
.ashby-job-posting-header{color:var(--freetrade-white);}

/* 5) Body / secondary copy */
.ashby-job-posting-brief-details,
.ashby-job-board-filters-label,
.ashby-job-board-reset-filters-label,
.ashby-application-form-question-title,
.ashby-application-form-question-description,
.ashby-application-form-section-header-title,
.ashby-application-form-section-header-description,
.ashby-application-form-texting-consent-description{color:var(--_tokens-colour---text--secondary);}

/* 6) Text links = pink */
a,
.ashby-job-posting-brief a,
.ashby-job-posting-left-pane a,
.ashby-job-posting-right-pane a,
.ashby-application-form-container a{
  color:var(--freetrade-pink) !important;
  text-decoration-color:var(--freetrade-pink);
}
a:visited{color:var(--freetrade-pink) !important;}
a:hover{opacity:.9;}

/* 7) Job cards */
.ashby-job-posting-brief{
  background:transparent;
  border:1px solid var(--darkest-grey);
  /* FIXED: set the top edge correctly */
  border-top:1px solid var(--darkest-grey);
  border-radius:var(--borderRadiusContainer,10px);
  margin-bottom:0.5rem; /* vertical gap */
  transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.ashby-job-posting-brief:hover{
  background-color:var(--off-black); /* off-black on hover */
  border-color:var(--darkest-grey);
}

/* Containers stay dark */
.ashby-job-posting-left-pane,
.ashby-job-posting-right-pane,
.ashby-application-form-container,
.ashby-application-form-section-container,
.ashby-survey-form-container{background:transparent;color:var(--_tokens-colour---text--secondary);}
.ashby-job-posting-right-pane-tab-slider{background:var(--darkest-grey);}

/* 8) Filters / selects */
.ashby-job-board-filter{
  background:var(--freetrade-black);
  color:var(--_tokens-colour---text--secondary);
  border:1px solid var(--darkest-grey);
  border-radius:var(--borderRadiusControl,10px);
}

/* 9) Application inputs */
.ashby-application-form-field-entry input,
.ashby-application-form-field-entry select,
.ashby-application-form-field-entry textarea{
  background:var(--freetrade-black);
  color:var(--_tokens-colour---text--secondary);
  border:1px solid var(--darkest-grey);
  border-radius:var(--borderRadiusControl,10px);
}
.ashby-application-form-autofill-input-form-alert{
  border:1px solid var(--darkest-grey);
  background:var(--freetrade-black);
  color:var(--_tokens-colour---text--secondary);
}

/* 10) Buttons — always purple with white text */
.ashby-application-form-submit-button,
.ashby-job-board-back-to-all-jobs-button,
.ashby-job-board-reset-filters-label{
  background:var(--button-purple) !important;
  color:var(--freetrade-white) !important;
  border:1px solid var(--button-purple) !important;
  border-radius:var(--borderRadiusButton,10px);
  font-family:var(--dm-mono);
  text-transform:uppercase;
  letter-spacing:.04em;
}
.ashby-job-board-reset-filters-label {
 padding: 16px 24px !important;
color:var(--freetrade-white) !important;
}

.ashby-application-form-submit-button:hover,
.ashby-job-board-back-to-all-jobs-button:hover,
.ashby-job-board-reset-filters-label:hover{filter:brightness(1.06);}
.ashby-application-form-submit-button:active,
.ashby-job-board-back-to-all-jobs-button:active,
.ashby-job-board-reset-filters-label:active{filter:brightness(.96);}

/* 11) Focus visibility */
.ashby-application-form-submit-button:focus-visible,
.ashby-job-board-back-to-all-jobs-button:focus-visible,
.ashby-job-board-filter:focus-visible,
.ashby-application-form-field-entry input:focus-visible,
.ashby-application-form-field-entry select:focus-visible,
.ashby-application-form-field-entry textarea:focus-visible,
.ashby-job-posting-brief a:focus-visible{outline:2px solid var(--freetrade-pink);outline-offset:2px;}

/* 12) Footer */
footer[class*="_embedded_"]{background:transparent;border-top:1px solid var(--darkest-grey);color:var(--_tokens-colour---text--secondary);}
footer[class*="_embedded_"] a{color:var(--freetrade-pink);}

/* 13) Live regions */
[role="status"][aria-live]{color:var(--_tokens-colour---text--secondary);}

/* 14) Typography mapping USING ONLY ASHBY CLASSES */

/* Department heading level → "title" spec */
.ashby-department-heading-level{
  font-family:var(--dm-sans);
  font-size:32px;
  line-height:40px;
  font-weight:300;
  letter-spacing:-0.32px;
}

/* Job titles → "headline" spec (then overridden smaller below) */
.ashby-job-posting-brief-title{
  font-family:var(--dm-sans);
  font-size:40px;
  line-height:120%;
  font-weight:300;
  letter-spacing:-0.4px;
  text-transform:none;
}

/* Smaller job card titles (final value that wins) */
.ashby-job-posting-brief-title{
  font-family:var(--dm-sans);
  font-size:24px;
  line-height:130%;
  font-weight:300;
  letter-spacing:-0.24px;
  text-transform:none;
}

/* Force a visible top edge on job cards (defensive) */
.ashby-job-posting-brief{
  border:1px solid var(--darkest-grey) !important;
  border-top-style:solid !important;
  border-top-width:1px !important;
  border-top-color:var(--darkest-grey) !important;
}

/* Keep the top edge on hover and on the first card */
.ashby-job-posting-brief:hover{
  border-color:var(--darkest-grey) !important;
  border-top-width:1px !important;
  border-top-style:solid !important;
}
.ashby-job-posting-brief-list .ashby-job-posting-brief:first-child{
  border-top-width:1px !important;
  border-top-style:solid !important;
}

/* Hide the Ashby footer inside the iframe */
footer[class*="_embedded_"]{
  display:none !important;
  height:0 !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
}
