/* ==========================================================================
   Ungated "How to Hire the Best Engineers for the AI Era" ebook and feature checklist at
   /resources/how-to-hire-the-best-engineers-for-the-ai-era/.
   Loaded only by that page (metadata "page_stylesheet"); every class is hb- prefixed.
   Ported from the approved single-file design. Same system as the other ebooks:
   Satoshi display, Geist Mono eyebrows/labels/CTAs, black/white/brand-red bands.
   Side navigation, reading progress and anchors use setupEbook() in site.js; the
   checklist tally, saved state and print button use setupFeatureChecklist().
   ========================================================================== */
/* Tokens and resets, scoped to the page root. */
.hb-ebook {
  --red: var(--color-red-500, #d91629);
  --orange: var(--color-orange-400, #fb5e38);
  --ink: var(--color-black-950, #121112);
  --paper: #ffffff;
  --soft: #efefef;
  --muted: #5b5b5b;
  --display: "Satoshi", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hb-ebook *,
.hb-ebook *::before,
.hb-ebook *::after {
  box-sizing: border-box;
}
.hb-ebook :where(img, svg) {
  max-width: 100%;
  display: block;
}
.hb-ebook :where(a) {
  color: inherit;
}
.hb-ebook :is(a, button, summary):focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
.hb-ebook :where(h1, h2, h3, h4, p, ul, ol, figure, blockquote) {
  margin: 0;
}
.hb-ebook :where(h1, h2) {
  text-wrap: balance;
}
.hb-ebook :where([id]) {
  scroll-margin-top: calc(var(--ebook-header-h, 80px) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html:has(.hb-ebook) {
    scroll-behavior: smooth;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hb-ebook *,
  .hb-ebook *::before,
  .hb-ebook *::after {
    transition: none !important;
  }
}
.hb-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.hb-wrap {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4.5vw, 52px);
}
.hb-eyebrow {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
}
.hb-page {
  padding-block: clamp(24px, 3vw, 40px);
}
.hb-page.hb-flush-top {
  padding-top: 0;
}
.hb-h2 {
  font-weight: 500;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
  margin-top: 16px;
}

/* Reading progress: a thin bar along the bottom of the sticky site header. */
.hb-progress {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--ebook-progress-top, 0px);
  z-index: 55;
  height: 3px;
  background: linear-gradient(90deg, var(--color-red-500, #d91629), var(--color-orange-400, #fb5e38));
  transform: scaleX(var(--ebook-progress, 0));
  transform-origin: 0 50%;
  pointer-events: none;
}

/* Side navigation: fixed and collapsed to section codes; expands on hover or focus. */
.hb-sidenav {
  position: fixed;
  left: 14px;
  top: calc(50% + 40px);
  transform: translateY(-50%);
  z-index: 40;
  width: 52px;
  max-height: calc(100vh - 126px);
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .16);
  padding: 8px;
  transition: width .18s ease;
}
.hb-sidenav:hover,
.hb-sidenav:focus-within {
  width: 250px;
}
.hb-sidenav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.hb-sidenav a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 12px;
  color: #3a3a3a;
  padding: 7px 4px;
}
.hb-sidenav a:hover {
  background: #f3f3f3;
}
.hb-sidenav .hb-k {
  flex: none;
  width: 34px;
  text-align: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1px;
  color: #6b6b6b;
}
.hb-sidenav .hb-t {
  font-weight: 500;
  font-size: 14.5px;
}
.hb-sidenav li[data-active] > a {
  background: var(--soft);
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--red);
}
.hb-sidenav li[data-active] > a .hb-k {
  color: var(--ink);
}
@media (min-width: 1620px) {
  .hb-sidenav {
    width: 250px;
  }
}
@media (max-width: 1000px) {
  .hb-sidenav {
    display: none;
  }
}
.hb-jump {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 11px 16px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}
.hb-jump:hover {
  background: var(--red);
}
/* Keep text clear of the fixed side navigation. */
@media (min-width: 1001px) {
  .hb-jump {
    display: none;
  }
  .hb-ebook {
    --navclear: 96px;
  }
  .hb-wrap {
    padding-left: max(clamp(20px, 4.5vw, 52px), calc(var(--navclear) - max(0px, (100vw - 1100px) / 2)));
  }
}
@media (min-width: 1620px) {
  .hb-ebook {
    --navclear: 290px;
  }
}

.hb-red {
  color: var(--red);
}
.hb-o {
  color: var(--orange);
}

/* Cover: title on the left, red-to-orange grid block on the right. */
.hb-cover {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hb-blk {
  position: absolute;
  background: var(--red);
}
.hb-blk.hb-tl {
  left: 0;
  top: 0;
  width: clamp(64px, 8vw, 120px);
  height: clamp(64px, 8vw, 120px);
  border-bottom-right-radius: 32px;
}
.hb-blk.hb-br {
  right: 0;
  bottom: 0;
  width: clamp(56px, 7vw, 110px);
  height: clamp(40px, 5vw, 72px);
  border-top-left-radius: 32px;
}
.hb-cover-in {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(96px, 10vw, 130px) clamp(56px, 8vw, 110px);
}
.hb-cover .hb-eyebrow {
  font-weight: 600;
}
.hb-cover h1 {
  font-weight: 400;
  font-size: clamp(44px, 5.6vw, 76px);
  line-height: 1.06;
  letter-spacing: 0;
  margin-top: 16px;
  color: #fff;
}
.hb-cover h1 .hb-o {
  display: block;
}
.hb-art {
  position: relative;
  min-height: clamp(180px, 24vw, 340px);
}
.hb-gridblock {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background-image:
    linear-gradient(rgba(255, 255, 255, .55) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(255, 255, 255, .55) 1.5px, transparent 1.5px),
    linear-gradient(160deg, var(--red) 0%, var(--orange) 100%);
  background-size: 25% 25%, 25% 25%, 100% 100%;
  background-position: -1px -1px, -1px -1px, 0 0;
}

/* Contents */
.hb-toc {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  border-top: 1px solid #8c8c8c;
}
.hb-toc li {
  border-bottom: 1px solid #c9c9c9;
}
.hb-toc a {
  display: grid;
  grid-template-columns: clamp(56px, 9vw, 110px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  text-decoration: none;
}
.hb-n {
  font-weight: 700;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1;
  color: var(--red);
}
.hb-n svg {
  width: clamp(30px, 4vw, 44px);
  height: auto;
}
.hb-toc-t {
  font-weight: 500;
  font-size: clamp(17px, 2vw, 21px);
}
.hb-toc a:hover .hb-toc-t {
  color: var(--red);
}

/* Introduction */
.hb-lede {
  font-size: clamp(17px, 1.7vw, 19px);
  line-height: 1.65;
  margin-top: clamp(14px, 2vw, 22px);
  max-width: 860px;
  color: #2b2b2b;
}
.hb-inl {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hb-ebook a.hb-inl {
  color: var(--red);
}
.hb-pillars {
  width: 100%;
  max-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: clamp(20px, 2.8vw, 30px);
}
.hb-pillars thead th {
  background: var(--ink);
  color: #fff;
  text-align: left;
  font-weight: 500;
  font-size: 16px;
  padding: 14px 18px;
}
.hb-pillars thead th:first-child {
  border-radius: 12px 0 0 12px;
}
.hb-pillars thead th:last-child {
  border-radius: 0 12px 12px 0;
}
.hb-pillars tbody :is(th, td) {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 1px solid #cfcfcf;
  font-size: 16px;
  line-height: 1.45;
}
.hb-pillars tbody th {
  color: var(--red);
  font-weight: 500;
  width: 45%;
}
.hb-talk {
  max-width: 860px;
  background: #f2f2f2;
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 18px;
  text-align: center;
  font-size: 16px;
}
.hb-ebook .hb-talk a {
  color: var(--red);
  font-weight: 500;
}

/* Question sections */
.hb-chead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  max-width: 980px;
}
.hb-chead .hb-h2 {
  margin-top: 0;
  max-width: 720px;
}
.hb-bignum {
  flex: none;
  font-weight: 500;
  font-size: clamp(72px, 11vw, 140px);
  line-height: .8;
  color: #ececec;
  letter-spacing: -2px;
  user-select: none;
}
.hb-bignum::before {
  content: attr(data-n);
}
.hb-dots {
  list-style: none;
  padding: 0;
  margin: clamp(18px, 2.6vw, 28px) 0 0;
  display: grid;
  gap: 12px;
  max-width: 860px;
}
.hb-dots li {
  position: relative;
  padding-left: 28px;
  font-size: 17px;
  line-height: 1.55;
}
.hb-dots li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}
.hb-dots b {
  color: var(--red);
  font-weight: 500;
}
.hb-callbox {
  max-width: 860px;
  background: #f2f2f2;
  border-radius: 20px;
  padding: clamp(20px, 3vw, 30px);
  margin-top: clamp(20px, 2.8vw, 32px);
}
.hb-cb {
  font-weight: 700;
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.5;
}
.hb-callbox p + p {
  font-size: 16.5px;
  line-height: 1.6;
  margin-top: 6px;
  color: #333;
}
.hb-ebook .hb-callbox p a {
  color: var(--red);
  font-weight: 500;
}
.hb-callbox .hb-btn {
  margin-top: 16px;
}

/* Buttons: pill, Geist Mono uppercase. */
.hb-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 15px 24px;
  line-height: 1.3;
  cursor: pointer;
}
.hb-ebook .hb-btn-red {
  background: var(--red);
  color: #fff;
}
.hb-ebook .hb-btn-out {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--red);
}
.hb-btn:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hb-btn[hidden] {
  display: none;
}

/* Feature checklist: native checkboxes in a form; reset clears it without JavaScript. */
.hb-checklist {
  background: var(--ink);
  color: #fff;
  padding-block: clamp(32px, 4.4vw, 56px);
}
.hb-clhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--red);
  border-radius: 20px;
  padding: clamp(20px, 3vw, 32px);
}
.hb-clhead .hb-eyebrow {
  color: #fff;
}
.hb-clhead .hb-h2 {
  margin-top: 6px;
  color: #fff;
}
.hb-count {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
}
.hb-cl {
  columns: 2;
  column-gap: 14px;
  margin-top: 14px;
}
.hb-cat {
  break-inside: avoid;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  min-width: 0;
  background: #fff;
  color: var(--ink);
  border-radius: 20px;
  overflow: hidden;
}
.hb-cat legend {
  float: left;
  width: 100%;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: #2b2a2b;
  padding: 14px 20px;
}
.hb-cat ul {
  clear: both;
  list-style: none;
  margin: 0;
  padding: 6px 0;
}
.hb-cat li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid #e4e4e4;
}
.hb-cat li:first-child {
  border-top: 0;
}
.hb-cat input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--red);
  cursor: pointer;
}
.hb-cat input:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}
.hb-cat label {
  cursor: pointer;
}
.hb-cat label b {
  display: block;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
}
.hb-cat label span {
  display: block;
  font-size: 14.5px;
  line-height: 1.5;
  color: #4a4a4a;
  margin-top: 3px;
}
.hb-cat input:checked + label b {
  color: var(--red);
}
.hb-clfoot {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  justify-content: flex-end;
}
.hb-checklist :is(a, button):focus-visible {
  outline-color: #fff;
}

/* FAQ */
.hb-faq {
  margin-top: 22px;
  border-top: 1px solid #c9c9c9;
}
.hb-faq details {
  border-bottom: 1px solid #c9c9c9;
}
.hb-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 700;
  font-size: clamp(17px, 2vw, 20px);
}
.hb-faq summary::-webkit-details-marker {
  display: none;
}
.hb-faq summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--red);
  font-size: 22px;
  line-height: 1;
}
.hb-faq details[open] summary::after {
  content: "–";
}
.hb-faq details p {
  padding: 0 0 18px;
  font-size: 16.5px;
  max-width: 820px;
}

/* Responsive */
@media (max-width: 860px) {
  .hb-cover-in {
    grid-template-columns: 1fr;
  }
  .hb-art {
    min-height: 120px;
    max-width: 340px;
    width: 100%;
    justify-self: end;
  }
  .hb-cl {
    columns: 1;
  }
}
@media (max-width: 620px) {
  .hb-ebook {
    font-size: 16px;
  }
  .hb-toc a {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .hb-bignum {
    font-size: 56px;
  }
  .hb-pillars thead {
    display: none;
  }
  .hb-pillars :is(tbody, tr, th, td) {
    display: block;
    width: auto;
  }
  .hb-pillars tbody th {
    border-bottom: 0;
    padding: 14px 4px 2px;
  }
  .hb-pillars tbody td {
    padding: 0 4px 14px;
  }
}

/* Print: only the checklist. */
@media print {
  body:has(.hb-ebook) :is(header, footer, .js-site-header) {
    display: none !important;
  }
  .hb-ebook > :not(#checklist),
  .hb-clfoot,
  .hb-count {
    display: none !important;
  }
  .hb-checklist {
    background: #fff;
    color: #000;
  }
  .hb-clhead {
    background: none;
    padding: 0;
  }
  .hb-clhead :is(.hb-eyebrow, .hb-h2) {
    color: #000;
  }
  .hb-cl {
    columns: 2;
  }
  .hb-cat {
    border: 1px solid #999;
  }
}
