:root {
  --library-wine: #94142f;
  --library-ink: #211b1d;
  --library-paper: #fbf8f3;
  --library-line: #ded5d2;
  --library-muted: #655c5d;
}

.search-library-shell,
.search-hub-shell,
.search-library-index {
  background:
    radial-gradient(circle at 18% 10%, rgb(255 255 255 / 78%), transparent 28%),
    linear-gradient(130deg, #fcfaf6, #f8f4ee 55%, #fcfaf7);
  color: var(--library-ink);
}

/* The shared article shell is intentionally narrow for reading articles. The
   decision-library hero is a two-column editorial spread, so let its own
   1180px grid and the narrower reading column below control their widths. */
.search-library-shell {
  width: 100%;
  max-width: none;
  padding-inline: 0;
}

.search-library-shell .search-library-header {
  grid-template-columns: minmax(0, 1fr) minmax(420px, .82fr);
  gap: clamp(48px, 6vw, 88px);
}

.search-library-shell .search-library-header > div {
  min-width: 0;
}

.search-library-header .article-category,
.search-library-header h1,
.search-library-header .article-lead {
  padding-inline: 0;
}

.search-library-header .article-category {
  margin-bottom: 18px;
}

.search-library-header .article-lead {
  margin-top: 24px;
  padding-bottom: 0;
}

.search-library-header figure {
  background: #eee7df;
}

.search-library-header figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.search-library-header h1 {
  max-width: 19ch;
  font-size: clamp(36px, 3.7vw, 54px);
  line-height: 1.36;
  text-wrap: balance;
}

@media (max-width: 900px) {
  .search-library-shell .search-library-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .search-library-header h1 {
    max-width: 22ch;
  }

  .search-library-header figure {
    width: min(100%, 680px);
  }
}

.search-library-body {
  width: min(calc(100% - 64px), 1040px);
  margin-inline: auto;
}

.library-answer,
.library-board,
.library-observe,
.library-tradeoff,
.library-final,
.library-hair-evidence,
  .library-swatches,
  .library-specific,
  .library-questions,
  .library-log {
  padding: clamp(48px, 7vw, 92px) 0;
  border-top: 1px solid var(--library-line);
}

.library-answer h2,
.library-board h2,
.library-observe h2,
.library-tradeoff h2,
.library-final h2,
.library-hair-evidence h2,
  .library-swatches h2,
  .library-specific h2,
  .library-questions h2,
  .library-log h2 {
  max-width: 18ch;
  margin: 0 0 26px;
  font: 400 clamp(29px, 4.2vw, 48px) / 1.35 var(--serif);
  letter-spacing: .025em;
}

.library-answer > p,
.library-board > p,
.library-observe > p,
.library-tradeoff > p,
.library-final > p,
.library-hair-evidence > p,
  .library-swatches > p,
  .library-specific > p,
  .library-questions > p,
  .library-log > p {
  max-width: 760px;
  color: #4e4748;
  font-size: 16px;
  line-height: 2;
}

.library-answer ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 42px 0;
  padding: 0;
  background: var(--library-line);
  list-style: none;
}

.library-answer li {
  display: grid;
  align-content: start;
  min-height: 190px;
  padding: 24px;
  background: #fffdfa;
}

.library-answer li b {
  margin-bottom: 30px;
  color: var(--library-wine);
  font: 400 31px / 1 var(--serif);
}

.library-answer li span {
  line-height: 1.85;
}

.library-board figure {
  margin: 36px 0;
  background: #efe7df;
}

.library-board figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.library-board figcaption {
  padding: 14px 18px;
  color: #76696b;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .04em;
}

.library-observe ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 34px 0;
  padding: 0;
  list-style: none;
}

.library-observe li {
  padding: 24px;
  border-top: 2px solid var(--library-wine);
  background: #fffdfa;
}

.library-observe strong,
.library-observe span {
  display: block;
}

.library-observe strong {
  min-height: 3em;
  margin-bottom: 16px;
  font: 400 20px / 1.5 var(--serif);
}

.library-observe span {
  color: var(--library-muted);
  font-size: 13px;
  line-height: 1.8;
}

.library-hair-grid {
  display: grid;
  gap: 24px;
  margin-top: 36px;
}

.library-hair-grid > article {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--library-line);
}

.library-hair-grid h3 {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px 20px;
  background: #fffdfa;
  font: 400 24px / 1.4 var(--serif);
}

.library-hair-grid figure {
  margin: 0;
  background: #eee8e2;
}

.library-hair-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.library-hair-grid figcaption {
  min-height: 72px;
  padding: 12px;
  background: #fffdfa;
  color: #615758;
  font-size: 12px;
  line-height: 1.65;
}

.library-swatches > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 32px;
}

.library-swatches article {
  padding: 20px;
  border-top: 2px solid var(--library-wine);
  background: #fffdfa;
}

.library-swatches i {
  display: block;
  height: 64px;
  margin-bottom: 18px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 9%);
}

.library-swatches h3 {
  margin: 0 0 14px;
  font: 400 21px / 1.45 var(--serif);
}

.library-swatches dl {
  display: grid;
  grid-template-columns: 5em 1fr;
  gap: 7px 12px;
  margin: 0;
  color: var(--library-muted);
  font-size: 12px;
  line-height: 1.65;
}

.library-swatches dd {
  margin: 0;
}

.library-specific > .decision-eyebrow {
  margin: 0 0 12px;
  color: var(--library-wine);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .16em;
}

.library-specific-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 38px;
  background: var(--library-line);
  counter-reset: library-dossier;
}

.library-specific-grid article {
  min-width: 0;
  padding: 26px 24px 30px;
  background: #fffdfa;
  counter-increment: library-dossier;
}

.library-specific-grid article::before {
  display: block;
  margin-bottom: 32px;
  color: var(--library-wine);
  content: "0" counter(library-dossier);
  font: 400 27px / 1 var(--serif);
  letter-spacing: .04em;
}

.library-specific-grid h3 {
  margin: 0 0 15px;
  font: 400 21px / 1.5 var(--serif);
  letter-spacing: .015em;
}

.library-specific-grid p {
  margin: 0;
  color: var(--library-muted);
  font-size: 13px;
  line-height: 1.9;
}

.library-questions ol {
  margin: 38px 0 30px;
  padding: 0;
  border-top: 1px solid var(--library-line);
  list-style: none;
  counter-reset: library-question;
}

.library-questions li {
  display: grid;
  grid-template-columns: 64px minmax(170px, .7fr) minmax(0, 1.3fr);
  gap: 22px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--library-line);
  counter-increment: library-question;
}

.library-questions li::before {
  color: var(--library-wine);
  content: "0" counter(library-question);
  font: 400 24px / 1.4 var(--serif);
}

.library-questions strong {
  font: 400 19px / 1.55 var(--serif);
}

.library-questions span {
  color: var(--library-muted);
  font-size: 13px;
  line-height: 1.9;
}

.library-questions > p:last-child {
  margin-top: 0;
  padding-left: 86px;
  border-left: 2px solid var(--library-wine);
}

.library-log > .decision-eyebrow {
  margin: 0 0 12px;
  color: var(--library-wine);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .16em;
}

.library-log ol {
  margin: 40px 0 0;
  padding: 0;
  border-top: 1px solid var(--library-line);
  list-style: none;
}

.library-log li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 26px;
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--library-line);
}

.library-log li > b {
  color: var(--library-wine);
  font: 400 28px / 1 var(--serif);
  letter-spacing: .04em;
}

.library-log h3 {
  margin: 0 0 12px;
  font: 400 21px / 1.5 var(--serif);
}

.library-log li p,
.library-log-stop p {
  max-width: 760px;
  margin: 0 0 10px;
  color: var(--library-muted);
  font-size: 13px;
  line-height: 1.9;
}

.library-log-stop {
  display: grid;
  grid-template-columns: minmax(150px, .45fr) minmax(0, 1fr);
  gap: 18px 28px;
  margin-top: 34px;
  padding-left: 24px;
  border-left: 2px solid var(--library-wine);
}

.library-log-stop h3,
.library-log-stop p {
  margin: 0;
}

.library-cta {
  margin-block: 8px clamp(52px, 8vw, 96px);
}

.search-hub-shell {
  width: 100%;
  max-width: none;
}

.search-hub-shell > .article-breadcrumb,
.search-hub-shell > .article-end-nav,
.search-hub-intro,
.search-hub-grid,
.search-hub-shell > .decision-cta,
.search-hub-shell > .article-related-reading {
  width: min(calc(100% - 64px), 1180px);
  margin-inline: auto;
}

.search-hub-header {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(420px, 1.2fr);
  gap: 56px;
  align-items: end;
  width: min(calc(100% - 64px), 1180px);
  margin-inline: auto;
  padding: clamp(48px, 7vw, 92px) 0;
}

.search-hub-header > p,
.search-hub-header > h1,
.search-hub-header > span {
  grid-column: 1;
}

.search-hub-header > p {
  margin: 0;
  color: var(--library-wine);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
}

.search-hub-header h1 {
  margin: 14px 0;
  font: 400 clamp(37px, 5vw, 66px) / 1.24 var(--serif);
  text-wrap: balance;
}

.search-hub-header > span {
  max-width: 44em;
  color: var(--library-muted);
  line-height: 1.9;
}

.search-hub-header img {
  grid-column: 2;
  grid-row: 1 / 4;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.search-hub-intro {
  padding: clamp(50px, 7vw, 90px) 0;
  border-top: 1px solid var(--library-line);
}

.search-hub-intro h2 {
  max-width: 16ch;
  font: 400 clamp(30px, 4vw, 48px) / 1.3 var(--serif);
}

.search-hub-intro p {
  max-width: 760px;
  color: #51494a;
  line-height: 2;
}

.search-hub-intro ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 36px 0;
  padding: 0;
  background: var(--library-line);
  list-style: none;
}

.search-hub-intro li {
  display: grid;
  min-height: 150px;
  padding: 22px;
  background: #fffdfa;
}

.search-hub-intro b {
  color: var(--library-wine);
  font: 400 25px / 1 var(--serif);
}

.search-hub-intro span {
  align-self: end;
  line-height: 1.7;
}

.search-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding-bottom: clamp(56px, 8vw, 100px);
  background: var(--library-line);
}

.search-hub-grid > article {
  min-width: 0;
  padding: clamp(24px, 4vw, 42px);
  background: #fffdfa;
}

.search-hub-grid p {
  margin: 0 0 12px;
  color: var(--library-wine);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}

.search-hub-grid h2 {
  margin: 0 0 14px;
  font: 400 clamp(22px, 2.7vw, 31px) / 1.45 var(--serif);
}

.search-hub-grid h2 a,
.search-hub-grid > article > a {
  color: inherit;
  text-decoration: none;
}

.search-hub-grid > article > span {
  display: block;
  min-height: 3.6em;
  color: var(--library-muted);
  font-size: 13px;
  line-height: 1.8;
}

.search-hub-grid ul {
  margin: 20px 0;
  padding-left: 1.2em;
  color: #5d5556;
  font-size: 12px;
  line-height: 1.8;
}

.search-hub-grid > article > a {
  display: flex;
  justify-content: space-between;
  min-height: 44px;
  padding-top: 14px;
  border-top: 1px solid var(--library-line);
  color: var(--library-wine);
  font-weight: 700;
}

.search-library-index {
  padding: 0 0 100px;
}

.search-library-index > header,
.search-library-index > section {
  width: min(calc(100% - 64px), 1180px);
  margin-inline: auto;
}

.search-library-index > header {
  padding: clamp(70px, 10vw, 140px) 0;
}

.search-library-index > header p,
.search-library-index > section > p {
  color: var(--library-wine);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
}

.search-library-index > header h1 {
  margin: 16px 0 24px;
  font: 400 clamp(46px, 7vw, 88px) / 1.18 var(--serif);
}

.search-library-index > header span {
  display: block;
  max-width: 48em;
  color: var(--library-muted);
  line-height: 2;
}

.search-library-index > section {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 50px;
  padding: clamp(50px, 7vw, 90px) 0;
  border-top: 1px solid var(--library-line);
}

.search-library-index > section > p,
.search-library-index > section > h2,
.search-library-index > section > span {
  grid-column: 1;
}

.search-library-index > section > h2 {
  margin: 8px 0 12px;
  font: 400 33px / 1.4 var(--serif);
}

.search-library-index > section > span {
  color: var(--library-muted);
  font-size: 13px;
  line-height: 1.8;
}

.search-library-index > section > div {
  display: grid;
  grid-column: 2;
  grid-row: 1 / 5;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 26px;
}

.search-library-index > section a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  min-height: 82px;
  padding: 17px 0;
  border-bottom: 1px solid var(--library-line);
  color: inherit;
  text-decoration: none;
}

.search-library-index > section strong {
  line-height: 1.55;
}

.search-library-index > section small {
  color: var(--library-muted);
}

.search-library-index > section b {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  color: var(--library-wine);
}

.search-library-entry {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 14px 50px;
  width: min(100%, 1180px);
  margin: 80px auto 0;
  padding: 56px 0;
  border-block: 1px solid var(--library-line);
}

.search-library-entry > p,
.search-library-entry > h2,
.search-library-entry > span,
.search-library-entry-main {
  grid-column: 1;
}

.search-library-entry > p {
  margin: 0;
  color: var(--library-wine);
  font-size: 11px;
  letter-spacing: .13em;
}

.search-library-entry > h2 {
  margin: 0;
  font: 400 32px / 1.4 var(--serif);
}

.search-library-entry > span {
  color: var(--library-muted);
  font-size: 13px;
  line-height: 1.8;
}

.search-library-entry-main {
  color: var(--library-wine);
  font-weight: 700;
  text-decoration: none;
}

.search-library-entry > div {
  display: grid;
  grid-column: 2;
  grid-row: 1 / 6;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}

.search-library-entry > div a {
  display: flex;
  justify-content: space-between;
  min-height: 54px;
  padding: 15px 0;
  border-bottom: 1px solid var(--library-line);
  color: inherit;
  text-decoration: none;
}

.search-library-entry > div span {
  color: var(--library-wine);
}

@media (max-width: 700px) {
  .search-library-body,
  .search-hub-shell > .article-breadcrumb,
  .search-hub-shell > .article-end-nav,
  .search-hub-intro,
  .search-hub-grid,
  .search-hub-shell > .decision-cta,
  .search-hub-shell > .article-related-reading,
  .search-hub-header,
  .search-library-index > header,
  .search-library-index > section {
    width: 100%;
  }

  .search-library-header h1 {
    max-width: none;
    font-size: clamp(25px, 7.2vw, 30px);
    line-height: 1.42;
    text-wrap: pretty;
  }

  .library-answer,
  .library-board,
  .library-observe,
  .library-tradeoff,
  .library-final,
  .library-hair-evidence,
    .library-swatches,
    .library-specific,
    .library-questions,
    .library-log,
  .search-hub-intro,
  .search-library-index > section {
    padding: 42px 20px;
  }

  .library-answer h2,
  .library-board h2,
  .library-observe h2,
  .library-tradeoff h2,
  .library-final h2,
  .library-hair-evidence h2,
    .library-swatches h2,
    .library-specific h2,
    .library-questions h2,
    .library-log h2,
  .search-hub-intro h2 {
    max-width: none;
    font-size: 25px;
    line-height: 1.45;
  }

  .library-answer > p,
  .library-board > p,
  .library-observe > p,
  .library-tradeoff > p,
  .library-final > p,
  .library-hair-evidence > p,
    .library-swatches > p,
    .library-specific > p,
    .library-questions > p,
    .library-log > p,
  .search-hub-intro p {
    font-size: 15px;
    line-height: 1.95;
  }

  .library-answer ol,
  .library-observe ul,
  .library-specific-grid,
  .search-hub-intro ol,
  .search-hub-grid,
  .search-hub-header,
  .search-library-index > section,
  .search-library-entry {
    grid-template-columns: 1fr;
  }

  .library-answer li {
    min-height: 0;
  }

  .library-hair-grid > article {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .library-hair-grid h3 {
    grid-column: 1 / -1;
  }

  .library-hair-grid img {
    object-position: 50% 50%;
  }

  .library-hair-grid figcaption {
    min-height: 0;
  }

  .library-specific-grid {
    margin-top: 30px;
  }

  .library-specific-grid article {
    padding: 23px 20px 26px;
  }

  .library-specific-grid article::before {
    margin-bottom: 18px;
    font-size: 23px;
  }

  .library-questions ol {
    margin-top: 30px;
  }

  .library-questions li {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 6px 12px;
    padding: 22px 0;
  }

  .library-questions li::before {
    grid-column: 1;
    grid-row: 1 / 3;
    font-size: 21px;
  }

  .library-questions strong,
  .library-questions span {
    grid-column: 2;
  }

  .library-questions > p:last-child {
    padding-left: 16px;
  }

  .library-log ol {
    margin-top: 30px;
  }

  .library-log li {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 24px 0 28px;
  }

  .library-log li > b {
    font-size: 22px;
  }

  .library-log-stop {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-left: 16px;
  }

  .library-log-stop p + h3 {
    margin-top: 16px;
  }

  .search-hub-header {
    gap: 24px;
    padding: 32px 20px 0;
  }

  .search-hub-header > p,
  .search-hub-header > h1,
  .search-hub-header > span,
  .search-hub-header img {
    grid-column: 1;
    grid-row: auto;
  }

  .search-hub-header h1 {
    font-size: 31px;
    line-height: 1.38;
  }

  .search-hub-header img {
    width: calc(100% + 40px);
    margin-left: -20px;
  }

  .search-hub-grid {
    gap: 1px;
    padding: 1px 20px 54px;
  }

  .search-hub-grid > article {
    padding: 25px 20px;
  }

  .search-library-index > header {
    padding: 64px 20px;
  }

  .search-library-index > header h1 {
    font-size: 44px;
  }

  .search-library-index > section {
    gap: 8px;
  }

  .search-library-index > section > p,
  .search-library-index > section > h2,
  .search-library-index > section > span,
  .search-library-index > section > div {
    grid-column: 1;
    grid-row: auto;
  }

  .search-library-index > section > div,
  .search-library-entry > div {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .search-library-entry {
    gap: 10px;
    margin-top: 48px;
    padding: 42px 20px;
  }

  .search-library-entry > p,
  .search-library-entry > h2,
  .search-library-entry > span,
  .search-library-entry-main,
  .search-library-entry > div {
    grid-column: 1;
    grid-row: auto;
  }
}
