/* ==========================================================================
   app-from.us design system
   Editorial serif display over a system sans UI, one confident blue accent,
   photography-forward cards, light + dark. No frameworks, no webfonts, no
   animation libraries.
   ========================================================================== */

:root {
  --ink: #0c1526;
  --ink-2: #33405a;
  --ink-3: #5d6a85;
  --bg: #ffffff;
  --bg-2: #f5f7fb;
  --bg-3: #eaeff7;
  --line: #e0e6f0;
  --line-2: #c9d3e3;
  /* Form/button boundaries only. WCAG 1.4.11 wants 3:1 against every surface a
     control can sit on, which --line-2 does not reach. */
  --line-control: #6d7d9c;
  --accent: #0f5fd0;
  --accent-strong: #0a4699;
  --accent-soft: #e8f0fd;
  --accent-ink: #ffffff;
  --warn-bg: #fff8ec;
  --warn-line: #f0d6a8;
  --tip-bg: #ecfaf2;
  --tip-line: #b3e3c9;
  --focus: #b2560d;
  --dark: #0c1526;
  --dark-2: #16233a;
  --dark-line: #26344e;
  --on-dark: #ffffff;
  --on-dark-2: #b7c3d8;
  --on-dark-3: #8695b0;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(12, 21, 38, 0.05), 0 1px 3px rgba(12, 21, 38, 0.04);
  --shadow-2: 0 2px 4px rgba(12, 21, 38, 0.04), 0 12px 28px rgba(12, 21, 38, 0.08);
  --shadow-3: 0 24px 60px rgba(12, 21, 38, 0.16);

  --container: 1200px;
  --prose: 70ch;

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.85rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.1rem, 1.04rem + 0.3vw, 1.25rem);
  --step-2: clamp(1.3rem, 1.18rem + 0.6vw, 1.6rem);
  --step-3: clamp(1.6rem, 1.36rem + 1.1vw, 2.2rem);
  --step-4: clamp(1.95rem, 1.55rem + 2vw, 2.9rem);
  --step-5: clamp(2.35rem, 1.7rem + 3.2vw, 3.75rem);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9eef8;
    --ink-2: #bcc7db;
    --ink-3: #90a0ba;
    --bg: #0a0f1a;
    --bg-2: #0f1626;
    --bg-3: #162034;
    --line: #22304a;
    --line-2: #2f3e5c;
    --line-control: #65779e;
    --accent: #79b4ff;
    --accent-strong: #a8cfff;
    --accent-soft: #14273d;
    --accent-ink: #06101c;
    --warn-bg: #2a2213;
    --warn-line: #574526;
    --tip-bg: #12291f;
    --tip-line: #27513c;
    --focus: #ffb26b;
    --dark: #060a12;
    --dark-2: #0f1626;
    --dark-line: #22304a;
    --on-dark-2: #aab8d0;
    --on-dark-3: #8090ab;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-3: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}

/* ------------------------------------------------------------------- reset */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main { flex: 1 0 auto; }

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.25em; }
li { margin-bottom: 0.4em; }

code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.9em; }
code { background: var(--bg-3); padding: 0.12em 0.36em; border-radius: 5px; }
pre { background: var(--dark); color: #e6ecf7; padding: 1.1rem 1.25rem; border-radius: var(--radius); overflow-x: auto; }
pre code { background: none; padding: 0; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

table { border-collapse: collapse; width: 100%; }

blockquote { margin: 0 0 1.2em; }

.photo { display: block; width: 100%; height: 100%; object-fit: cover; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.spacer { height: var(--step-3); }

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s var(--ease);
}
.skip-link:focus { top: 1rem; color: var(--accent-ink); }

/* ------------------------------------------------------------------ layout */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section--tint { background: var(--bg-2); border-block: 1px solid var(--line); }
.section__more { margin-top: 2.25rem; text-align: center; }

.section__head { max-width: 62ch; margin-bottom: 2.25rem; }
.section__title { font-size: var(--step-3); margin-bottom: 0.35em; }
.section__lede { color: var(--ink-2); font-size: var(--step-1); margin: 0; }

.kicker {
  font-family: var(--font);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9em;
}
.kicker--light { color: rgba(255, 255, 255, 0.78); }

.grid { display: grid; gap: clamp(1rem, 2vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.grid--cats { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }

.split { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1.6fr 1fr; } }

.two { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .two { grid-template-columns: repeat(2, 1fr); } }

.layout-article { padding-bottom: clamp(2rem, 4vw, 3.5rem); }

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  padding: 0.78rem 1.4rem;
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn:hover { background: var(--bg-2); color: var(--ink); border-color: var(--ink-3); }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 2px rgba(12, 21, 38, 0.12);
}
.btn--primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); transform: translateY(-1px); }

.btn--ghost { background: transparent; border-color: rgba(255, 255, 255, 0.42); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; color: #fff; }

.btn--sm { padding: 0.5rem 0.9rem; font-size: var(--step--1); }

.actions, .hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  font-size: var(--step--1);
  font-weight: 600;
  padding: 0.34rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  text-decoration: none;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

.pill { font-size: var(--step--1); font-weight: 600; padding: 0.15rem 0.5rem; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-strong); }
.pill--on { background: var(--accent); color: var(--accent-ink); }
.pill--off { background: var(--bg-3); color: var(--ink-3); }

.muted { color: var(--ink-3); }
.hint { color: var(--ink-3); font-size: var(--step--1); }

/* ------------------------------------------------------------------ header */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__bar { display: flex; align-items: center; gap: 1.25rem; min-height: 4.25rem; }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 2.35rem; height: 2.35rem;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--accent) 0%, #0a3f96 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-1);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--font-serif); font-size: 1.16rem; font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }

.nav { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.nav__item { margin: 0; }
.nav__link {
  display: block;
  padding: 0.5rem 0.62rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--bg-2); }
.nav__link.is-current { color: var(--accent); background: var(--accent-soft); }

.nav-search { display: flex; align-items: center; }
.nav-search__label, .footer__search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.nav-search__input, .footer__search-input {
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-pill);
  padding: 0.48rem 0.9rem;
  width: 10.5rem;
  transition: width 0.2s var(--ease), border-color 0.15s var(--ease);
}
.nav-search__input:hover, .footer__search-input:hover { border-color: var(--ink-3); }
.nav-search__input:focus { width: 13.5rem; border-color: var(--accent); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  padding: 0.5rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle__bars { display: grid; gap: 3px; }
.nav-toggle__bars span { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin: 0;
    padding: 1rem clamp(1rem, 4vw, 2rem) 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-2);
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link { padding: 0.7rem 0.5rem; font-size: 1rem; border-radius: var(--radius-sm); }
  .nav-search__input { width: 100%; }
}

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

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--dark);
  color: #fff;
  display: grid;
  align-items: center;
  /* Photo band sized to half the display: full width, 50% of the viewport
     height. vh first for older browsers, svh so mobile browser chrome cannot
     clip it. min-height, so taller content grows the band rather than overflow. */
  min-height: 50vh;
  min-height: 50svh;
  padding-block: clamp(3rem, 8vw, 6.5rem);
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0.45; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(9, 15, 27, 0.94) 0%, rgba(9, 15, 27, 0.82) 42%, rgba(9, 15, 27, 0.42) 100%),
    radial-gradient(120% 100% at 85% 10%, rgba(15, 95, 208, 0.34) 0%, rgba(15, 95, 208, 0) 60%);
}
/* Portrait phones: the left-to-right scrim has nowhere to go, so switch to a
   vertical one and let more of the photo through under the text. */
@media (max-width: 640px) {
  .hero__media img { opacity: 0.5; }
  .hero::after {
    background:
      linear-gradient(180deg, rgba(9, 15, 27, 0.8) 0%, rgba(9, 15, 27, 0.72) 42%, rgba(9, 15, 27, 0.9) 100%),
      radial-gradient(130% 70% at 50% 0%, rgba(15, 95, 208, 0.32) 0%, rgba(15, 95, 208, 0) 65%);
  }
}
.hero__inner { position: relative; width: 100%; max-width: 60ch; }
.hero__title {
  color: #fff;
  font-size: var(--step-5);
  margin-bottom: 0.35em;
  letter-spacing: -0.02em;
}
.hero__lede { color: rgba(255, 255, 255, 0.86); font-size: var(--step-1); max-width: 52ch; }
.hero__actions { margin-top: 1.75rem; }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin: 2.75rem 0 0;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.hero__stats div { margin: 0; }
.hero__stats dt {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 0.2rem;
}
.hero__stats dd {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--step-2);
  font-weight: 700;
  color: #fff;
}

/* ------------------------------------------------------------------- trust */

.trust { background: var(--bg); border-bottom: 1px solid var(--line); }
.trust__grid { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); padding-block: clamp(1.75rem, 4vw, 2.75rem); }
@media (min-width: 860px) { .trust__grid { grid-template-columns: repeat(3, 1fr); } }
.trust__item { position: relative; padding-left: 1.1rem; }
.trust__item::before {
  content: "";
  position: absolute;
  left: 0; top: 0.35rem; bottom: 0.35rem;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}
.trust__title { font-family: var(--font); font-size: 1rem; font-weight: 700; letter-spacing: -0.005em; margin: 0 0 0.35rem; }
.trust__text { color: var(--ink-2); margin: 0; font-size: 0.95rem; }

/* ------------------------------------------------------------------- cards */

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-3); }
.card__media img { transition: transform 0.4s var(--ease); }
.card:hover .card__media img { transform: scale(1.045); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 1.15rem 1.25rem 1.35rem; }
.card__cat { margin: 0 0 0.6rem; }
.card__cat a {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}
.card__cat a:hover { text-decoration: underline; }
.card__title { font-size: var(--step-1); margin: 0 0 0.45rem; line-height: 1.3; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--accent); }
.card__excerpt { color: var(--ink-2); font-size: 0.95rem; margin: 0 0 1rem; flex: 1; }
.card__meta {
  margin: 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card--plain { background: var(--bg-2); border-style: dashed; box-shadow: none; }
.card--plain .card__title { margin: 1.25rem 1.25rem 0; }

/* ------------------------------------------------------------- category card */

.cat-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.cat-card__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-3); }
.cat-card__media img { transition: transform 0.4s var(--ease); }
.cat-card:hover .cat-card__media img { transform: scale(1.05); }
.cat-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem 1.35rem 1.4rem; }
.cat-card__index {
  margin: 0 0 0.75rem;
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.cat-card__title { font-size: var(--step-2); margin: 0 0 0.5rem; }
.cat-card__title a { color: var(--ink); text-decoration: none; }
.cat-card__title a:hover { color: var(--accent); }
.cat-card__desc { color: var(--ink-2); margin: 0 0 1.1rem; flex: 1; }
.cat-card__meta {
  margin: 0;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-3);
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

/* Each category carries its own accent so the grid reads as distinct areas
   rather than five copies of the same tile. */
.cat-card--financial { --cat-accent: #0f7a5a; }
.cat-card--background-check { --cat-accent: #8a4b13; }
.cat-card--resumes { --cat-accent: #1f5fbf; }
.cat-card--technical { --cat-accent: #0f5fd0; }
.cat-card--technology { --cat-accent: #6b3fa0; }
.cat-card[class*="cat-card--"] .cat-card__index,
.cat-card[class*="cat-card--"] .cat-card__title a { color: var(--cat-accent, var(--accent)); }
.cat-card[class*="cat-card--"] { border-top: 3px solid var(--cat-accent, var(--accent)); }
.cat-card[class*="cat-card--"]:hover { border-color: var(--cat-accent, var(--accent)); }
.cat-card[class*="cat-card--"] .cat-card__title a:hover { color: var(--cat-accent, var(--accent)); }

/* ----------------------------------------------------------- resource cards */

.res-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-1);
}
.res-card__name { font-size: var(--step-1); margin: 0 0 0.45rem; }
.res-card__desc { color: var(--ink-2); margin: 0 0 0.6rem; }
.res-card__detail { color: var(--ink-3); font-size: 0.9rem; margin: 0 0 0.9rem; }
.res-card__flag {
  align-self: flex-start;
  margin: 0 0 0.9rem;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--bg-3);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.6rem;
}
.res-card__cta { margin: auto 0 0; }
.res-card__disc { color: var(--ink-3); font-size: 0.82rem; margin: 0.8rem 0 0; }

.resource-group { margin-bottom: 2rem; }
.resource-group__heading { font-size: var(--step-1); margin-bottom: 0.75rem; }
.resource { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; background: var(--bg); }
.resource__body > :last-child { margin-bottom: 0; }
.resource__name { font-size: var(--step-1); margin: 0 0 0.4rem; }
.resource__name a { color: var(--ink); text-decoration: none; }
.resource__name a:hover { color: var(--accent); text-decoration: underline; }
.resource__desc { color: var(--ink-2); margin: 0; }
.resource__flag {
  margin: 0.7rem 0 0;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* --------------------------------------------------------------- page heads */

/* Category banner: one source of truth for the photo band height, shared by the
   band itself and the padding that keeps the text clear of it. The height tracks
   the viewport width instead of being a fixed 200px, so the visible crop stays a
   consistent wide band (~4:1) on every screen -- a fixed height gave 9.6:1 on a
   desktop, where 80% of the photo fell outside the frame. */
.page-head {
  --page-head-media: clamp(140px, 25vw, 460px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--dark);
  color: #fff;
  display: grid;
  align-items: center;
  /* Band at the top, then the gap that stops the title overlapping it. */
  padding-top: calc(var(--page-head-media) + clamp(1.25rem, 3vw, 2rem));
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
/* Full-bleed band: left to right across the whole banner, height from the clamp. */
.page-head__media {
  position: absolute;
  inset: 0 0 auto;
  height: var(--page-head-media);
  z-index: -2;
}
.page-head__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.9;
}
/* Fade the photo into the banner background so the band has no hard pasted edge. */
.page-head__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(to bottom, rgba(9, 15, 27, 0) 0%, rgba(9, 15, 27, 0.96) 100%);
}
/* Scrim starts below the photo band: the band is the picture, the area under it
   is the text panel, and darkening both would flatten the photo for nothing. */
.page-head::after {
  content: "";
  position: absolute;
  inset: var(--page-head-media) 0 0;
  z-index: -1;
  background: linear-gradient(96deg, rgba(9, 15, 27, 0.95) 0%, rgba(9, 15, 27, 0.72) 60%, rgba(9, 15, 27, 0.4) 100%);
}
@media (max-width: 640px) {
  .page-head::after { background: linear-gradient(180deg, rgba(9, 15, 27, 0.8) 0%, rgba(9, 15, 27, 0.78) 50%, rgba(9, 15, 27, 0.92) 100%); }
}
.page-head__inner { max-width: 62ch; }
.page-head__title { color: #fff; font-size: var(--step-4); margin-bottom: 0.3em; }
.page-head__lede { color: rgba(255, 255, 255, 0.85); font-size: var(--step-1); margin: 0 0 1rem; }
.page-head__meta {
  margin: 0;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.page-head .kicker { color: rgba(255, 255, 255, 0.7); }

/* Same category accents as the cards, lightened for the dark banner. */
.page-head--financial { --cat-accent-light: #6fd7b1; }
.page-head--background-check { --cat-accent-light: #f0b57c; }
.page-head--resumes { --cat-accent-light: #93b8ff; }
.page-head--technical { --cat-accent-light: #8cb8ff; }
.page-head--technology { --cat-accent-light: #c4a6f5; }
.page-head[class*="page-head--"] .kicker { color: var(--cat-accent-light, rgba(255, 255, 255, 0.7)); }

/* ------------------------------------------------------------------ article */

.article { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.article__head { max-width: 68ch; margin-bottom: 2rem; }
.article__title { font-size: var(--step-4); margin-bottom: 0.4em; }
.article__lede { color: var(--ink-2); font-size: var(--step-1); margin-bottom: 1.5rem; }
.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.article__meta div { margin: 0; }
.article__meta dt {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.article__meta dd { margin: 0; font-size: 0.95rem; font-weight: 600; }

.article__cover {
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  aspect-ratio: 2 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-3);
  box-shadow: var(--shadow-2);
}
/* Matches TALL in src/lib/images.mjs: the tall crop is served by viewport shape,
   so the box that crops it has to switch on the same condition. */
@media (max-width: 640px), (max-aspect-ratio: 3/4) { .article__cover { aspect-ratio: 8 / 9; border-radius: var(--radius); } }

.article__foot {
  margin-top: 2.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.9rem;
}

/* ------------------------------------------------------------------- prose */

.prose { max-width: var(--prose); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.2em; margin-bottom: 0.5em; }
.prose h3 { margin-top: 1.8em; margin-bottom: 0.45em; }
.prose h4 { margin-top: 1.5em; margin-bottom: 0.4em; }
.prose > :first-child { margin-top: 0; }
.prose li { margin-bottom: 0.5em; }
.prose strong { font-weight: 700; }

.check { list-style: none; padding: 0; }
.check li { position: relative; padding-left: 1.75rem; }
.check li::before {
  content: "";
  position: absolute;
  left: 0.15rem; top: 0.5em;
  width: 0.55rem; height: 0.3rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.pullquote {
  margin: 2em 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 4px solid var(--accent);
  font-family: var(--font-serif);
  font-size: var(--step-2);
  font-style: italic;
  color: var(--ink);
}

.note {
  margin: 1.6em 0;
  padding: 1.05rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left-width: 4px;
  background: var(--bg-2);
}
.note__title { margin: 0 0 0.4rem; font-size: 1rem; font-family: var(--font); font-weight: 700; }
.note > :last-child { margin-bottom: 0; }
.note--info { background: var(--accent-soft); border-color: var(--accent); }
.note--tip { background: var(--tip-bg); border-color: var(--tip-line); }
.note--warning { background: var(--warn-bg); border-color: var(--warn-line); }

.panel {
  margin: 1.6em 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
.panel__head {
  padding: 0.85rem 1.15rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0;
}
.panel__body { padding: 1.15rem; }
.panel__body > :last-child { margin-bottom: 0; }

.steps { list-style: none; padding: 0; counter-reset: step; }
.steps__item { position: relative; padding-left: 3rem; margin-bottom: 1.5rem; }
.steps__num {
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 0.85rem;
}
.steps__title { font-size: var(--step-1); margin: 0 0 0.3rem; }
.steps__detail { color: var(--ink-2); margin: 0; }

.table-wrap { overflow-x: auto; margin: 1.6em 0; }
.table-wrap table { min-width: 32rem; }
th, td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--bg-2); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
tbody tr:last-child td { border-bottom: 0; }

.faq { margin: 1.6em 0; display: grid; gap: 0.75rem; }
.faq__heading {
  margin: 0 0 0.25rem;
  font-family: var(--font);
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.faq__item { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq__q { margin: 0; font-weight: 700; padding: 0.9rem 1.1rem; background: var(--bg-2); }
.faq__a { margin: 0; padding: 0.9rem 1.1rem; color: var(--ink-2); }

/* -------------------------------------------------------------- components */

.crumbs { padding-block: 1.1rem; }
.crumbs__list { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; font-size: var(--step--1); }
.crumbs__item { margin: 0; color: var(--ink-3); display: flex; gap: 0.4rem; }
.crumbs__item + .crumbs__item::before { content: "/"; color: var(--line-2); }
.crumbs__item a { color: var(--ink-3); text-decoration: none; }
.crumbs__item a:hover { color: var(--accent); text-decoration: underline; }
.crumbs__item [aria-current] { color: var(--ink-2); font-weight: 600; }

.toc {
  margin: 0 0 2rem;
  padding: 1.15rem 1.35rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.toc__heading {
  margin: 0 0 0.6rem;
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.toc__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.toc__item { margin: 0; font-size: 0.95rem; }
.toc__item--2 { font-weight: 600; }
.toc__item--3 { padding-left: 1rem; font-size: 0.9rem; }
.toc__item a { color: var(--ink-2); text-decoration: none; }
.toc__item a:hover { color: var(--accent); text-decoration: underline; }

.cta {
  margin: 2.25rem 0;
  padding: 1.6rem 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--dark);
  color: #fff;
}
.cta__title { color: #fff; font-size: var(--step-2); margin-bottom: 0.4rem; }
.cta__text { color: rgba(255, 255, 255, 0.84); }
.cta__links { list-style: none; margin: 1.1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.25rem; }
.cta__links li { margin: 0; }
.cta__links a { color: #fff; font-weight: 600; }

.related { margin: 2.5rem 0 0; }
.related__heading { font-size: var(--step-2); margin-bottom: 1rem; }
.related__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.related__item { margin: 0; }
.related__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.9rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.related__link:hover { border-color: var(--accent); background: var(--bg-2); }
.related__title { color: var(--ink); font-weight: 600; }
.related__link:hover .related__title { color: var(--accent); }
.related__meta { color: var(--ink-3); font-size: var(--step--1); white-space: nowrap; }

.disclosure {
  margin: 2rem 0;
  padding: 1.1rem 1.3rem;
  background: var(--bg-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--ink-2);
}
.disclosure__label {
  margin: 0 0 0.4rem;
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.disclosure p:last-child { margin-bottom: 0; }
.disclosure--compact { margin: 0; }

/* ------------------------------------------------- home: editorial teaser */

.about-teaser { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (min-width: 900px) { .about-teaser { grid-template-columns: 1.55fr 1fr; } }
.about-teaser__body > :first-child { margin-top: 0; }
.about-teaser__body p { color: var(--ink-2); }
.about-teaser__body .btn { margin-top: 0.4rem; }
.about-teaser__aside .disclosure {
  margin: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-style: solid;
}

/* ------------------------------------------------------------------ search */

.search-form { margin-bottom: 1.25rem; }
.search-form__label { display: block; font-weight: 700; margin-bottom: 0.5rem; }
.search-form__row { display: flex; gap: 0.6rem; }
.search-form__input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line-control);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
}
.search-form__input:focus { border-color: var(--accent); }
.search-status { color: var(--ink-3); font-size: 0.92rem; margin-bottom: 1.5rem; }

.slist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.srow {
  margin: 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.srow[hidden] { display: none; }
.srow__title { font-size: var(--step-1); margin: 0 0 0.3rem; }
.srow__title a { color: var(--ink); text-decoration: none; }
.srow__title a:hover { color: var(--accent); }
.srow__cat {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.4rem;
}
.srow__excerpt { display: block; color: var(--ink-2); font-size: 0.95rem; }

/* ------------------------------------------------------------------- lists */

.srow + .srow, .row + .row { margin-top: 0; }

.row {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.row__top { display: flex; flex-direction: column; gap: 0.3rem; }
.row__name { font-family: var(--font); font-weight: 700; margin: 0; }
.row__meta { color: var(--ink-3); font-size: var(--step--1); }

.notice { margin: 0 0 1.5rem; }
.msg { padding: 0.9rem 1.1rem; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); }

/* ------------------------------------------------------------------ footer */

.footer { background: var(--dark); color: var(--on-dark-2); margin-top: auto; }

.footer__statement {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--dark-line);
  font-size: 0.9rem;
  color: var(--on-dark-2);
}
.footer__dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #35d07f; box-shadow: 0 0 0 3px rgba(53, 208, 127, 0.22); }

.footer__grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-block: clamp(2.75rem, 6vw, 4rem);
}
@media (min-width: 720px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer__grid { grid-template-columns: 1.6fr repeat(3, 1fr); } }

.footer__col { min-width: 0; }
.footer__col--brand { max-width: 34ch; }
.brand--footer { margin-bottom: 1rem; }
.brand--footer .brand__name { color: #fff; }
.footer__desc { font-size: 0.94rem; }
.footer__search { display: flex; margin-top: 1.1rem; }
.footer__search-input { width: 100%; background: var(--dark-2); border-color: var(--dark-line); color: #fff; }
.footer__search-input::placeholder { color: var(--on-dark-3); }
.footer__search-input:hover { border-color: var(--on-dark-3); }
.footer__search-input:focus { border-color: #fff; }

.footer__heading {
  font-family: var(--font);
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 0.9rem;
}
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer__list li { margin: 0; }
.footer__list a { color: var(--on-dark-2); text-decoration: none; font-size: 0.94rem; }
.footer__list a:hover { color: #fff; text-decoration: underline; }
.footer__name { color: #fff; font-weight: 700; }
.footer__disc { font-size: 0.86rem; color: var(--on-dark-3); }

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  padding-block: 1.25rem;
  border-top: 1px solid var(--dark-line);
  font-size: 0.86rem;
  color: var(--on-dark-3);
}
.footer__bar p { margin: 0; }

/* ------------------------------------------------------- redirect + errors */

.redirect { padding-block: clamp(3rem, 8vw, 5rem); }
.redirect__url { color: var(--ink-3); font-size: 0.9rem; word-break: break-all; }
.page--notfound .page-head__title { color: var(--ink); }

/* ------------------------------------------------------------------- print */

@media print {
  .header, .footer, .nav, .cta, .related, .toc, .skip-link, .trust, .article__cover, .card__media, .cat-card__media { display: none !important; }
  body { color: #000; background: #fff; font-size: 11pt; }
  .page-head { background: none; color: #000; padding: 0 0 1rem; }
  .page-head::after, .page-head__media { display: none; }
  .page-head__title, .page-head__lede, .page-head__meta, .page-head .kicker { color: #000; }
  a { color: #000; text-decoration: underline; }
  .prose { max-width: none; }
}
