.library-home {
  --home-ink: #152e27;
  --home-muted: #4c5f55;
  --home-gold: var(--color-accent, #fbc004);
  --home-line: #dfe6dd;
  background: #fff;
  color: var(--home-ink);
}
.library-home .utility,
.library-home .header-shelf,
.library-home .free-library-banner,
.library-home .footer-invite { display: none; }
.library-home .library-header { border-bottom: 1px solid var(--home-line); }
.library-home .library-header .nav { min-height: 76px; }
.library-home .nav-join { background: var(--home-gold); color: #16271f; }
.library-home .nav-join:hover { background: #f0c958; color: #16271f; }
.home-intro { background: #f5f7ef; border-bottom: 1px solid var(--home-line); }
.home-intro-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  gap: clamp(30px, 6vw, 90px);
  padding-block: clamp(30px, 5vw, 76px);
}
.home-label { font-size: .9rem; font-weight: 750; color: #355746; margin: 0 0 13px; }
.home-intro h1 {
  margin: 0;
  max-width: 12ch;
  color: var(--home-ink);
  font-family: Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.8rem, 6.1vw, 5.8rem);
  line-height: .99;
  letter-spacing: -.055em;
}
.home-intro h1 em { color: #31674d; font-weight: inherit; }
.home-lead { max-width: 42ch; color: var(--home-muted); margin: 22px 0 24px; font-size: clamp(1rem, 1.5vw, 1.2rem); }
.home-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 540px;
  padding: 5px;
  border: 1px solid #aabaaa;
  border-radius: 12px;
  background: #fff;
}
.home-search:focus-within { outline: 2px solid #31674d; outline-offset: 2px; }
.home-search > svg { margin-left: 10px; flex: none; color: #31674d; }
.home-search input { flex: 1; width: 0; min-width: 0; border: 0; background: transparent; padding: 0; outline: none; font-size: 1rem; }
.home-search button { flex: none; min-height: 48px; padding: 0 20px; border: 0; border-radius: 8px; font: inherit; font-weight: 800; color: #192a23; background: var(--home-gold); cursor: pointer; }
.home-search button:hover { background: #f0c958; }
.home-access { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 15px 0 0; font-size: .9rem; color: var(--home-muted); }
.home-access svg { width: 17px; height: 17px; color: #31674d; }
.home-portrait {
  display: grid;
  grid-template-rows: minmax(0,1fr) auto;
  width: 100%;
  height: clamp(290px, 34vw, 450px);
  overflow: hidden;
  border-radius: 22px;
  background: #18372c;
  box-shadow: 0 16px 42px #1f37221a;
  color: #fff;
}
.home-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.home-portrait-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; }
.home-portrait-caption small { display: block; color: #f4cd64; font-size: .8rem; }
.home-portrait-caption strong { display: block; font-size: 1.25rem; }
.home-portrait:hover { color: #fff; }
.home-section { padding-block: 34px; }
.home-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 15px; }
.home-section-head h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.35rem); letter-spacing: -.035em; }
.home-section-head a { display: inline-flex; align-items: center; gap: 8px; color: #315c46; font-weight: 750; }
.home-resource-grid, .home-tool-links { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.home-resource-card { position: relative; display: block; min-width: 0; padding: 18px; border: 1px solid var(--home-line); border-radius: 14px; color: var(--home-ink); }
.home-resource-card:hover { border-color: #779283; background: #f7faf5; }
.home-card-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: #f9edc4; color: #46340d; }
.home-resource-card > svg { position: absolute; top: 22px; right: 16px; width: 18px; }
.home-resource-card h3 { margin: 12px 0 3px; font-size: 1.08rem; }
.home-resource-card p { margin: 0; color: var(--home-muted); font-size: .9rem; }
.home-grade-links { display: flex; flex-wrap: wrap; gap: 9px; }
.home-grade-links a, .home-tool-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 9px 13px; border: 1px solid var(--home-line); border-radius: 9px; background: #fff; color: #274e3b; font-weight: 700; }
.home-grade-links a:hover, .home-tool-links a:hover { border-color: #779283; }
.home-tools { background: #f5f7ef; }
.home-tool-links a { justify-content: space-between; }
.home-tool-links svg { flex: none; width: 18px; }
@media (max-width: 850px) {
  .home-resource-grid, .home-tool-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .library-home .library-header .nav { min-height: 64px; }
  .home-intro-grid { display: flex; flex-direction: column; align-items: stretch; gap: 22px; }
  .home-break { display: none; }
  .home-intro h1 { max-width: 14ch; }
  .home-lead { margin-block: 14px 16px; }
  .home-portrait { width: min(100%, 360px); align-self: center; height: auto; border-radius: 12px; }
  .home-portrait img { width: 100%; height: auto; }
  .home-portrait-caption { flex: 1; padding: 7px 12px; }
  .home-portrait-caption strong { font-size: 1.08rem; }
  .home-section { padding-block: 23px; }
  .home-resource-card { padding: 12px; }
  .home-resource-card > svg { right: 10px; top: 16px; }
  .home-search button { padding-inline: 12px; }
}
@media (min-width: 901px) {
  .library-home #main-nav { gap: clamp(9px, 1.15vw, 18px); font-size: clamp(.76rem, 1.38vw, .93rem); }
  .library-home #main-nav > a,
  .library-home #main-nav summary,
  .library-home .nav-auth { white-space: nowrap; }
  .library-home .nav-auth { gap: 10px; padding-left: 10px; }
  .library-home .nav-join { padding-inline: 12px; }
}
@media (min-width: 641px) {
  .home-intro h1 { max-width: none; font-size: clamp(2.5rem, 5.7vw, 5.8rem); }
  .home-intro h1 em { white-space: nowrap; }
}


.home-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin: 0; }
.home-stats div { background: #f2f6ed; color: #173c2c; border: 1px solid #dce8dc; border-radius: 1rem; padding: 1.25rem; display: flex; flex-direction: column-reverse; }
.home-stats dt { font-weight: 600; }
.home-stats dd { margin: 0; font-size: clamp(1.8rem,5vw,3.2rem); font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.2; }
.home-stats-note,.home-founder p,.home-faq p { max-width: 72ch; }
.home-faq details { border-bottom: 1px solid #dce8dc; padding: .85rem 0; }
.home-faq summary { cursor: pointer; font-weight: 650; }
@media (max-width: 580px) { .home-stats { grid-template-columns: 1fr; } }
.home-actions,.home-subjects {display:flex;flex-wrap:wrap;gap:.65rem;margin:1rem 0}
.home-actions .button {text-align:center}
.home-subjects a {padding:.45rem .8rem;border-radius:.5rem;border:1px solid #d3e2d7;font-weight:650}
.home-tool-links small {display:block;font-weight:400;margin-top:.35rem}
.home-email {background:#eaf3ea;border:1px solid #d3e2d7;border-radius:1rem;padding:clamp(1rem,4vw,2.5rem);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem}
.home-email form {display:grid;gap:.65rem}
.home-email form .home-email-consent {display:flex;align-items:flex-start;gap:.55rem}
.home-email form input[type=checkbox] {width:1rem;height:1rem;flex:none}
.home-insights {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.home-insights article {border:1px solid #d3e2d7;border-radius:.8rem;padding:1rem;overflow-wrap:anywhere}
@media(max-width:700px){.home-email,.home-insights{grid-template-columns:1fr}.home-actions .button{width:100%}}