:root {
  --hbd-ink: #173f3c;
  --hbd-copy: #334e4b;
  --hbd-green: #0b6b5e;
  --hbd-green-dark: #07544a;
  --hbd-mint: #eef8f5;
  --hbd-line: #d5e8e3;
  --hbd-warm: #fffaf0;
  --hbd-white: #ffffff;
  --hbd-shadow: 0 16px 42px rgba(23, 63, 60, 0.08);
}

.hbd-library-main {
  background: linear-gradient(180deg, #f5fbf9 0, #fff 380px);
  color: var(--hbd-copy);
  font-size: 17px;
  line-height: 1.7;
  padding: 24px 18px 64px;
}

.hbd-library-shell {
  margin: 0 auto;
  max-width: 1180px;
}

.hbd-library-breadcrumb {
  color: #55706d;
  font-size: 14px;
  margin: 0 0 24px;
}

.hbd-library-breadcrumb ol {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hbd-library-breadcrumb li:not(:last-child)::after {
  color: #8aa39f;
  content: "/";
  margin-left: 8px;
}

.hbd-library-breadcrumb a,
.hbd-library-main a,
.hbd-part-of-library a {
  color: var(--hbd-green);
}

.hbd-library-breadcrumb a:hover,
.hbd-library-main a:hover,
.hbd-part-of-library a:hover {
  color: var(--hbd-green-dark);
}

.hbd-library-hero {
  background: radial-gradient(circle at 92% 10%, rgba(255,255,255,.75), transparent 35%), linear-gradient(135deg, #dff4ed, #eff9f6);
  border: 1px solid var(--hbd-line);
  border-radius: 24px;
  box-shadow: var(--hbd-shadow);
  margin-bottom: 42px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
  position: relative;
}

.hbd-library-hero::after {
  border: 2px solid rgba(11, 107, 94, .12);
  border-radius: 50%;
  content: "";
  height: 220px;
  position: absolute;
  right: -54px;
  top: -78px;
  width: 220px;
}

.hbd-library-eyebrow,
.hbd-library-section-label,
.hbd-topic-group,
.hbd-latest-type {
  color: var(--hbd-green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.hbd-library-hero h1 {
  color: var(--hbd-ink);
  font-size: clamp(38px, 6vw, 64px);
  letter-spacing: -.035em;
  line-height: 1.04;
  margin: 0 0 18px;
  max-width: 850px;
}

.hbd-library-lead {
  color: var(--hbd-copy);
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.5;
  margin: 0;
  max-width: 850px;
}

.hbd-library-scope {
  background: rgba(255,255,255,.78);
  border-left: 4px solid var(--hbd-green);
  border-radius: 9px;
  margin-top: 24px;
  max-width: 900px;
  padding: 14px 16px;
  position: relative;
  z-index: 1;
}

.hbd-library-section {
  margin: 0 0 46px;
}

.hbd-library-section h2 {
  color: var(--hbd-ink);
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1.2;
  margin: 0 0 18px;
}

.hbd-start-card {
  align-items: center;
  background: var(--hbd-white);
  border: 1px solid var(--hbd-line);
  border-radius: 18px;
  box-shadow: var(--hbd-shadow);
  display: flex;
  gap: 30px;
  justify-content: space-between;
  padding: clamp(22px, 4vw, 38px);
}

.hbd-start-card h2 {
  font-size: clamp(26px, 3vw, 36px);
  margin-bottom: 10px;
}

.hbd-start-card p {
  margin: 0;
  max-width: 760px;
}

.hbd-library-button {
  background: var(--hbd-green);
  border-radius: 999px;
  color: #fff !important;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 800;
  padding: 12px 20px;
  text-decoration: none;
}

.hbd-library-button:hover {
  background: var(--hbd-green-dark);
}

.hbd-section-heading {
  align-items: end;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.hbd-section-heading h2,
.hbd-section-heading p {
  margin-bottom: 0;
}

.hbd-section-heading > p {
  max-width: 470px;
}

.hbd-topic-grid,
.hbd-latest-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hbd-topic-card,
.hbd-latest-card,
.hbd-library-mini-card {
  background: var(--hbd-white);
  border: 1px solid var(--hbd-line);
  border-radius: 17px;
  padding: 24px;
}

.hbd-topic-card {
  display: flex;
  flex-direction: column;
}

.hbd-topic-card h3,
.hbd-latest-card h3,
.hbd-library-mini-card h2 {
  color: var(--hbd-ink);
  font-size: 23px;
  line-height: 1.28;
  margin: 0 0 10px;
}

.hbd-topic-icon {
  background: var(--hbd-mint);
  border: 1px solid var(--hbd-line);
  border-radius: 50%;
  height: 46px;
  margin-bottom: 16px;
  position: relative;
  width: 46px;
}

.hbd-topic-icon::before,
.hbd-topic-icon::after {
  border: 2px solid var(--hbd-green);
  content: "";
  left: 12px;
  position: absolute;
  top: 12px;
}

.hbd-topic-icon::before {
  border-radius: 50%;
  height: 17px;
  width: 17px;
}

.hbd-topic-icon::after {
  border-left: 0;
  border-top: 0;
  height: 7px;
  left: 25px;
  top: 25px;
  transform: rotate(45deg);
  width: 7px;
}

.hbd-topic-links {
  border-top: 1px solid #e6f0ed;
  list-style: none;
  margin: 8px 0 18px;
  padding: 13px 0 0;
}

.hbd-topic-links li + li {
  margin-top: 6px;
}

.hbd-topic-action {
  font-weight: 800;
  margin-top: auto;
}

.hbd-question-section {
  background: var(--hbd-warm);
  border: 1px solid #efe4cb;
  border-radius: 18px;
  padding: clamp(22px, 4vw, 36px);
}

.hbd-question-list {
  display: grid;
  gap: 9px;
}

.hbd-question-list a {
  align-items: center;
  background: #fff;
  border: 1px solid #eadfc7;
  border-radius: 10px;
  display: flex;
  font-weight: 750;
  justify-content: space-between;
  padding: 13px 15px;
  text-decoration: none;
}

.hbd-latest-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hbd-latest-card p:last-child,
.hbd-library-mini-card p:last-child {
  margin-bottom: 0;
}

.hbd-library-tool-card {
  align-items: center;
  background: linear-gradient(135deg, var(--hbd-white), var(--hbd-mint));
  display: flex;
  gap: 28px;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 36px);
  width: 100%;
}

.hbd-library-tool-copy {
  max-width: 780px;
}

.hbd-library-admin-note {
  background: #fff6d8;
  border: 1px solid #edd98d;
  border-radius: 9px;
  padding: 15px;
}

.hbd-part-of-library {
  background: var(--hbd-mint);
  border-left: 4px solid var(--hbd-green);
  border-radius: 8px;
  color: var(--hbd-copy);
  margin: 0 0 22px;
  padding: 11px 14px;
}

.hbd-home {
  color: var(--hbd-copy);
  margin: 0 auto;
  max-width: 1180px;
}

.hbd-home-hero {
  background: radial-gradient(circle at 88% 16%, rgba(255,255,255,.8), transparent 34%), linear-gradient(135deg, #dff4ed, #f3faf8);
  border: 1px solid var(--hbd-line);
  border-radius: 24px;
  box-shadow: var(--hbd-shadow);
  margin-bottom: 48px;
  padding: clamp(30px, 6vw, 66px);
}

.hbd-home-hero h1 {
  color: var(--hbd-ink);
  font-size: clamp(38px, 6vw, 66px);
  letter-spacing: -.04em;
  line-height: 1.03;
  margin: 0 0 18px;
  max-width: 910px;
}

.hbd-home-hero > p:not(.hbd-library-eyebrow) {
  font-size: clamp(19px, 2.2vw, 24px);
  max-width: 820px;
}

.hbd-home-actions {
  align-items: end;
  display: flex;
  gap: 20px;
  margin-top: 28px;
}

.hbd-home-search {
  flex: 1 1 520px;
  max-width: 620px;
}

.hbd-home-search label {
  color: var(--hbd-ink);
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 6px;
}

.hbd-home-search > div {
  display: flex;
}

.hbd-home-search input {
  background: #fff;
  border: 1px solid #afcdc6;
  border-radius: 10px 0 0 10px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 14px;
}

.hbd-home-search button {
  background: var(--hbd-ink);
  border: 0;
  border-radius: 0 10px 10px 0;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 12px 18px;
}

.hbd-home-section {
  margin-bottom: 52px;
}

.hbd-home-section h2 {
  color: var(--hbd-ink);
  font-size: clamp(28px, 3.3vw, 40px);
  line-height: 1.18;
  margin: 0 0 20px;
}

.hbd-home-library-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hbd-home-library-card {
  background: #fff;
  border: 1px solid var(--hbd-line);
  border-radius: 17px;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.hbd-home-library-card h3 {
  color: var(--hbd-ink);
  font-size: 23px;
  line-height: 1.25;
  margin: 0 0 10px;
}

.hbd-home-library-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 4px 0 20px;
  padding: 0;
}

.hbd-home-library-card li {
  background: var(--hbd-mint);
  border-radius: 999px;
  color: var(--hbd-green-dark);
  font-size: 13px;
  padding: 5px 9px;
}

.hbd-home-library-mark {
  background: linear-gradient(135deg, #a9d9ce, #e4f5f1);
  border-radius: 999px;
  height: 9px;
  margin-bottom: 18px;
  width: 58px;
}

.hbd-home-support-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/*
 * Future homepage rollout safeguards. Version 0.2.1 hard-disables homepage
 * replacement, so these rules cannot load on Page 10277 in this build. They
 * replace layout-critical inline CSS in the stored body after a separately
 * reviewed future release changes the source-level gate.
 */
body.page-id-10277 .entry-header,
body.page-id-10277 .single-page-header,
body.page-id-10277 .sidebar-wrap,
body.page-id-10277 #ruby-main-menu,
html body.page-id-10277 nav#ruby-main-menu {
  display: none !important;
}

body.page-id-10277 .ruby-content-wrap {
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: none !important;
  padding: 0 !important;
  width: 100% !important;
}

body.page-id-10277 .ruby-page-wrap {
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 1280px !important;
  width: 100% !important;
}

body.page-id-10277 .ruby-content-inner,
body.page-id-10277 .main-content-wrap {
  float: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: none !important;
  width: 100% !important;
}

@media (max-width: 820px) {
  .hbd-start-card,
  .hbd-section-heading,
  .hbd-library-tool-card {
    align-items: stretch;
    flex-direction: column;
  }

  .hbd-topic-grid,
  .hbd-latest-grid,
  .hbd-home-library-grid,
  .hbd-home-support-grid {
    grid-template-columns: 1fr;
  }

  .hbd-library-button {
    align-self: flex-start;
  }

  .hbd-home-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hbd-home-search {
    flex-basis: auto;
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hbd-library-main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hbd-library-hero,
  .hbd-topic-card,
  .hbd-latest-card,
  .hbd-library-mini-card {
    border-radius: 14px;
  }

  .hbd-library-breadcrumb {
    font-size: 13px;
  }
}

