.hbi [hidden] { display: none !important; }

.hbi {
  --hbi-head: "Bricolage Grotesque", system-ui, sans-serif;
  --hbi-small: "IBM Plex Mono", ui-monospace, monospace;
  --hbi-space: clamp(30px, 5vw, 68px);
}

.hbi-skip {
  position: fixed;
  z-index: 60;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  background: var(--hb-paper);
  color: var(--hb-ink);
  transform: translateY(-160%);
}

.hbi-skip:focus { transform: translateY(0); }
.hbi-page { padding-block: clamp(28px, 5.5vw, 76px) 80px; }
.hbi-page, .hbi-landing { overflow-wrap: anywhere; }
.hbi-page h1, .hbi-page h2, .hbi-card__title, .hbi-landing__request h3 {
  font-family: var(--hbi-head);
  font-weight: 720;
  letter-spacing: -.025em;
  line-height: 1.1;
}
.hbi-page h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .99;
  text-wrap: balance;
}
.hbi-page h2,
.hbi-landing__request h3 { margin: 0; font-size: clamp(26px, 3.5vw, 38px); }
.hbi-heading {
  max-width: 880px;
  display: grid;
  justify-items: start;
  gap: 16px;
  margin-bottom: var(--hbi-space);
}
.hbi-heading .hbi-back { margin-bottom: 10px; }
.hbi-back,
.hbi-text-link,
.hbi-sign-in { font-weight: 650; text-underline-offset: 4px; }
.hbi-lede {
  max-width: 36em;
  margin: 0;
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.4;
  color: var(--hb-ink-soft);
}

.hbi-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.hbi-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  min-height: 36px;
  padding: 4px 11px;
  border: 1px solid #bfbcb2;
  border-radius: 999px;
  background: var(--hb-paper);
  color: var(--hb-ink);
  font-size: 14px;
  line-height: 1.25;
  text-decoration: none;
}
.hbi .hbi-pill:hover { border-color: var(--hb-ink); color: var(--hb-ink); }
.hbi-state {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid #bfbcb2;
  border-radius: 4px;
  color: var(--hb-ink);
  font: 500 12px/1.25 var(--hbi-small);
}
.hbi-state--open { background: var(--hb-accent); border-color: var(--hb-accent); }
.hbi-state--building { background: #f8ecd3; border-color: #d7bd85; }

.hbi-filters {
  display: grid;
  gap: 20px;
  margin-bottom: 40px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid var(--hb-line);
  border-radius: 14px;
  background: var(--hb-soft);
}
.hbi-filters fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.hbi-filters label, .hbi-filters legend, .hbi-request label { font-weight: 600; }
.hbi-filters legend { padding: 0; margin-bottom: 8px; }
.hbi-search { display: grid; justify-items: stretch; gap: 6px; max-width: 520px; }
.hbi-search input, .hbi-selects select, .hbi-request input, .hbi-request textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #bfbcb2;
  border-radius: 7px;
  background: var(--hb-paper);
  color: var(--hb-ink);
  font: inherit;
}
.hbi-filter-pill { position: relative; min-height: 42px; cursor: pointer; }
.hbi-filter-pill > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.hbi-filter-pill:has(input:focus-visible) { outline: 3px solid var(--hb-ink); outline-offset: 3px; }
.hbi .hbi-filter-pill:has(input:checked) { background: var(--hb-ink); border-color: var(--hb-ink); color: var(--hb-on-dark); }
.hbi-topic-count { padding-left: 5px; font-family: var(--hbi-small); font-size: 12px; font-weight: 400; }
.hbi-selects { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 18px; }
.hbi-selects label { display: grid; gap: 5px; font-size: 15px; }
.hbi-selects .hbi-first { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.hbi-first input { width: 17px; height: 17px; accent-color: var(--hb-ink); }
.hbi-clear {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--hb-ink);
  font: 600 15px/1.3 "IBM Plex Sans", system-ui, sans-serif;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.hbi-results, .hbi-count, .hbi-hint, .hbi-feedback {
  margin: 0;
  color: var(--hb-muted);
  font-size: 14px;
}

.hbi-group + .hbi-group { margin-top: var(--hbi-space); }
.hbi-group > h2, .hbi-related > h2 { margin-bottom: 16px; }
.hbi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}
.hbi-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--hb-line);
  border-radius: 13px;
  background: var(--hb-paper);
}
.hbi-card__image { overflow: hidden; border-radius: 12px 12px 0 0; }
.hbi-card__image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.hbi-card__body { flex: 1; display: grid; align-content: start; gap: 9px; padding: 18px; }
.hbi-card__title { margin: 0; font-size: clamp(22px, 2.35vw, 30px); }
.hbi-card__title a { text-underline-offset: 4px; text-decoration-thickness: 1px; }
.hbi-card__body p { margin: 0; color: var(--hb-ink-soft); }
.hbi-card__body .hbi-pills { margin-top: 3px; }
.hbi-card__body .hbi-count { color: var(--hb-muted); }
.hbi-card__body .hbi-pill { min-height: 31px; font-size: 13px; }
.hbi-empty { margin: 0; }

.hbi-brief { max-width: 1000px; }
.hbi-brief .hbi-heading { gap: 13px; margin-bottom: clamp(22px, 3.5vw, 42px); }
.hbi-brief .hbi-heading .hbi-pills { margin-top: 5px; }
.hbi-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 9px; }
.hbi .hbi-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 46px;
  padding: 8px 16px;
  border: 1px solid var(--hb-accent);
  border-radius: 8px;
  background: var(--hb-accent);
  color: var(--hb-ink);
  font: inherit;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.hbi .hbi-button:hover { border-color: var(--hb-ink); }
.hbi-button[aria-pressed="true"] { background: var(--hb-ink); border-color: var(--hb-ink); color: var(--hb-on-dark); }
.hbi .hbi-button[aria-pressed="true"]:hover { color: var(--hb-on-dark); }
.hbi-button:disabled { opacity: .65; cursor: wait; }
.hbi-feedback:empty { display: none; }

.hbi-figure { margin: 0; min-width: 0; }
.hbi-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 640px;
  margin-inline: auto;
  object-fit: contain;
  border-radius: 11px;
}
.hbi-figure figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1px 12px;
  margin-top: 8px;
  color: var(--hb-muted);
  font-size: 14px;
}
.hbi-figure figcaption a { color: inherit; text-underline-offset: 3px; }
.hbi-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: var(--hbi-space); }
.hbi-gallery img { max-height: 360px; }
.hbi-summary {
  max-width: 68ch;
  margin: var(--hbi-space) 0 0;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}
.hbi-section { margin-top: var(--hbi-space); }
.hbi-prose { max-width: 68ch; }
.hbi-prose p, .hbi-prose ul { margin-block: 12px 0; }
.hbi-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0 0;
  padding: 0;
  gap: 12px;
  list-style-position: inside;
}
.hbi-steps li { padding: 18px; border: 1px solid var(--hb-line); border-radius: 10px; background: var(--hb-soft); }
.hbi-steps li::marker { font: 600 14px var(--hbi-small); }
.hbi-steps h3 { display: inline; font-size: 17px; }
.hbi-steps p { margin: 8px 0 0; color: var(--hb-ink-soft); }
.hbi-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: var(--hbi-space); }
.hbi-split section { padding-top: 15px; border-top: 2px solid var(--hb-accent); }
.hbi-split p { margin-block: 10px 0; }
.hbi-sources { padding: 0; list-style: none; }
.hbi-sources li { display: grid; justify-items: start; gap: 3px; padding-block: 9px; border-bottom: 1px solid var(--hb-line); }
.hbi-sources span { color: var(--hb-muted); font-size: 15px; }

.hbi-request {
  max-width: 660px;
  margin-top: var(--hbi-space);
  padding: clamp(18px, 4vw, 32px);
  border: 1px solid var(--hb-line);
  border-radius: 13px;
  background: var(--hb-soft);
  scroll-margin-top: 80px;
}
.hbi-request--idea:not(:target):not([data-open]) { display: none; }
.hbi-request p { margin: 9px 0 14px; }
.hbi-request form { display: grid; align-items: start; gap: 7px; }
.hbi-request label:not(:first-child) { margin-top: 8px; }
.hbi-request textarea { resize: vertical; }
.hbi-request .hbi-hint { margin: 0 0 8px; }
.hbi-request .hbi-feedback { margin: 4px 0 0; }

.hbi-landing { display: grid; justify-items: start; gap: 18px; padding-block: 26px var(--hbi-space); }
.hbi-landing .hbi-grid { width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hbi-landing__request { display: grid; gap: 8px; width: 100%; margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--hb-line); }

@media (max-width: 850px) {
  .hbi-grid, .hbi-landing .hbi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .hbi-grid, .hbi-landing .hbi-grid, .hbi-split, .hbi-steps, .hbi-gallery { grid-template-columns: minmax(0, 1fr); }
  .hbi-selects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
  .hbi-selects .hbi-first { font-size: 14px; }
  .hbi-clear { justify-self: start; }
  .hbi-brief .hbi-heading { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hbi *, .hbi *::before, .hbi *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
