.library-theme .site-header {
  padding: 0;
}

.library-theme .header-inner {
  width: min(var(--max), calc(100% - 56px));
  height: 70px;
  padding: 0;
  gap: 20px;
}

.library-theme .brand-by {
  font-size: 9px;
  letter-spacing: 1.7px;
}

.library-theme .site-header nav {
  gap: clamp(12px, 1.45vw, 22px);
}

.library-theme .site-header nav a {
  padding: 0;
  min-height: 70px;
  font-size: 15px;
  font-weight: 500;
  color: #454f46;
}

.library-theme .header-actions .search-trigger {
  padding: 0 12px;
  min-height: 40px;
  border: 1px solid #dce3d7;
  border-radius: 9px;
  background: #fff;
  font-size: 15px;
  white-space: nowrap;
}

.library-theme .search-trigger:hover {
  border-color: #99ab8c;
}

.library-theme[data-crypto-home] .hero {
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  margin-top: 22px;
  padding: 33px clamp(26px, 4.3vw, 62px);
  border-radius: 20px;
  background: radial-gradient(ellipse at 80% 55%, #263223 0, transparent 51%), #171c19;
}

.library-theme[data-crypto-home] .hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 4.1vw, 58px);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.17;
  text-wrap: initial;
}

.library-theme[data-crypto-home] .hero p {
  max-width: 32em;
  margin: 0;
  color: #c5cfc2;
  font-size: 16px;
  line-height: 1.75;
}

.library-theme[data-crypto-home] .hero-actions {
  gap: 10px;
  margin-top: 22px;
}

.library-theme[data-crypto-home] .hero-actions .button,
.library-theme[data-crypto-home] .hero-secondary {
  justify-content: center;
  gap: 12px;
  min-height: 45px;
  margin: 0;
  padding: 10px 15px;
  font-size: 15px;
  white-space: nowrap;
}

.library-theme[data-crypto-home] .hero-secondary {
  border: 1px solid #53634f;
  border-radius: 8px;
  color: #edf3ea;
  transition: background-color .2s, border-color .2s;
}

.library-theme[data-crypto-home] .hero-secondary:hover {
  border-color: #8da380;
  background: #ffffff12;
}

.library-theme[data-crypto-home] .hero-visual {
  height: auto;
  margin: 0;
  pointer-events: none;
}

.library-theme[data-crypto-home] .hero-art {
  width: 100%;
  height: clamp(230px, 22vw, 306px);
  max-height: none;
  object-fit: contain;
}

.library-theme[data-crypto-home] .platform-overview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.library-theme[data-crypto-home] .platform-tile {
  gap: 12px;
  padding: 15px clamp(10px, 1.6vw, 22px);
  border-radius: 13px;
  background: #fff;
}

.library-theme[data-crypto-home] .wallet-tile {
  grid-column: auto;
  background: #e7f0d9;
}

.library-theme[data-crypto-home] .platform-symbol {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 24px;
}

.library-theme[data-crypto-home] .platform-tile h2 {
  margin: 0 0 3px;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 700;
  line-height: 1.3;
}

.library-theme[data-crypto-home] .platform-tile p,
.library-theme[data-crypto-home] .topic-card > div {
  color: #505e50;
  font-size: 14px;
  line-height: 1.45;
}

.library-theme[data-crypto-home] :is(.platform-tile, .topic-card):hover {
  border-color: #a3b590;
  box-shadow: 0 4px 14px #2941220c;
  transform: translateY(-2px);
}

.library-theme[data-crypto-home] .start-strip {
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  margin-top: 12px;
  padding: 10px 16px;
  border-radius: 13px;
}

.library-theme[data-crypto-home] .start-intro {
  grid-column: auto;
  padding: 0 12px 0 3px;
}

.library-theme[data-crypto-home] .start-intro h2 {
  font-size: 18px;
}

.library-theme[data-crypto-home] .start-strip > a {
  gap: 9px;
  min-height: 42px;
  padding: 0 9px 0 12px;
  border-left: 1px solid var(--line);
}

.library-theme[data-crypto-home] .start-strip > a:hover h3 {
  color: #49643b;
}

.library-theme[data-crypto-home] .start-strip h3 {
  font-size: 15px;
  line-height: 1.4;
  white-space: normal;
}

.library-theme[data-crypto-home] .step-number {
  color: #617256;
  font-size: 16px;
}

.library-theme[data-crypto-home] .start-strip > a > .icon {
  display: block;
}

.library-theme[data-crypto-home] #main > .section {
  padding-top: 34px;
  padding-bottom: 0;
}

.library-theme[data-crypto-home] .section-heading {
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 14px;
}

.library-theme[data-crypto-home] .section-heading > div {
  flex: 1 1 auto;
}

.library-theme[data-crypto-home] .section-heading h2 {
  font-size: clamp(23px, 2vw, 28px);
}

.library-theme[data-crypto-home] .text-link {
  gap: 6px;
  min-height: 32px;
  font-size: 14px;
  font-weight: 500;
}

.library-theme[data-crypto-home] .topic-grid {
  gap: 12px;
}

.library-theme[data-crypto-home] .topic-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  align-content: center;
  gap: 4px 11px;
  padding: 13px;
}

.library-theme[data-crypto-home] .topic-icon {
  grid-row: span 2;
  width: 36px;
  height: 36px;
}

.library-theme[data-crypto-home] .topic-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.library-theme[data-crypto-home] .topic-card p {
  grid-column: 2;
  min-height: 0;
  margin: 0;
  font-size: 14px;
}

.library-theme[data-crypto-home] .topic-card > div {
  grid-column: 2;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
}

.library-theme[data-crypto-home] #main > .featured-section {
  margin-top: 30px;
  padding-block: 26px;
}

.library-theme[data-crypto-home] .card-info {
  padding: 14px;
}

.library-theme[data-crypto-home] .card-info h3 {
  min-height: 0;
  margin-block: 6px 12px;
  font-size: 16px;
  line-height: 1.5;
}

.library-theme[data-crypto-home] :is(.card-category, .card-bottom, .chapter-list > a) {
  color: #505e50;
  font-size: 14px;
}

.library-theme[data-crypto-home] .kind-badge {
  font-size: 12px;
  line-height: 1.3;
}

.library-theme .card-grid:has(> [data-crypto-text-card]) {
  gap: 12px;

  & > .content-card {
    flex-direction: row-reverse;
  }

  & .card-visual {
    flex: 0 0 clamp(72px, 24%, 100px);
    align-self: flex-start;
    aspect-ratio: 4 / 3;
    margin: 12px 12px 12px 0;
    border-radius: 8px;
  }

  & .kind-badge {
    bottom: 4px;
    left: 4px;
    padding: 2px 4px;
    font-size: 10px;
  }

  & .card-info {
    min-width: 0;
    padding: 12px 14px;
  }

  & .card-info h3 {
    min-height: 0;
    margin: 5px 0 10px;
    font-size: 16px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  & :is(.card-category, .card-bottom) {
    color: #505e50;
    font-size: 13px;
  }

  & .card-bottom {
    padding-top: 6px;
  }

  @media (max-width: 700px) {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1500px) {
  .library-theme .header-inner {
    width: min(1320px, calc(100% - 56px));
  }
}

@media (min-width: 1101px) and (max-width: 1370px) {
  .library-theme .header-inner {
    width: calc(100% - 80px);
  }
}

@media (max-width: 950px) {
  .library-theme .header-inner {
    gap: 12px;
  }

  .library-theme .site-header nav {
    gap: 10px;
  }

  .library-theme .site-header nav a {
    font-size: 14px;
  }
}

@media (max-width: 820px) {
  .library-theme .header-inner {
    width: calc(100% - 48px);
    height: 62px;
  }

  .library-theme .site-header nav {
    top: 100%;
    gap: 0;
  }

  .library-theme .site-header nav a {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 15px;
  }

  .library-theme .header-actions {
    gap: 8px;
  }

  .library-theme .mobile-menu {
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    font-size: 21px;
  }

  .library-theme[data-crypto-home] .start-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 6px;
  }

  .library-theme[data-crypto-home] .start-intro {
    grid-column: 1 / -1;
  }

  .library-theme[data-crypto-home] .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .library-theme[data-crypto-home] .hero {
    display: block;
    margin-top: 14px;
    padding: 23px 18px;
    border-radius: 16px;
  }

  .library-theme[data-crypto-home] .hero h1 {
    margin-bottom: 12px;
    font-size: clamp(28px, 9.6vw, 40px);
  }

  .library-theme[data-crypto-home] .hero p {
    max-width: 25em;
    font-size: 15px;
    line-height: 1.65;
  }

  .library-theme[data-crypto-home] .hero-actions {
    gap: 7px;
    margin-top: 17px;
  }

  .library-theme[data-crypto-home] .hero-actions .button,
  .library-theme[data-crypto-home] .hero-secondary {
    gap: 5px;
    padding-inline: 8px;
    font-size: 14px;
  }

  .library-theme[data-crypto-home] .hero-actions .icon {
    width: 16px;
  }

  .library-theme[data-crypto-home] .hero-visual {
    position: absolute;
    inset: auto -33px -23px auto;
    width: min(59%, 225px);
    opacity: .20;
  }

  .library-theme[data-crypto-home] .hero-art {
    height: auto;
    aspect-ratio: 620 / 500;
  }

  .library-theme[data-crypto-home] .platform-overview,
  .library-theme[data-crypto-home] .start-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .library-theme[data-crypto-home] .platform-tile {
    padding: 9px 12px;
  }

  .library-theme[data-crypto-home] .start-strip {
    gap: 0;
    padding-block: 6px;
  }

  .library-theme[data-crypto-home] .start-intro {
    padding: 4px 0 7px;
  }

  .library-theme[data-crypto-home] .start-strip > a {
    padding: 7px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .library-theme[data-crypto-home] #main > .section {
    padding-top: 22px;
  }

  .library-theme[data-crypto-home] .topic-grid {
    gap: 8px;
  }

  .library-theme[data-crypto-home] .topic-card {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 6px;
    padding: 10px;
  }

  .library-theme[data-crypto-home] .topic-icon,
  .library-theme[data-crypto-home] .topic-card p,
  .library-theme[data-crypto-home] .topic-card > div {
    grid-column: auto;
    grid-row: auto;
  }

  .library-theme[data-crypto-home] .topic-card h3 {
    font-size: 15px;
  }
}

@media (max-width: 580px) {
  .library-theme .header-inner {
    width: calc(100% - 36px);
  }
}

.prose p + p,
[data-article-body] p + p {
  margin-block-start: 1em;
}

.library-theme .article-body {
  min-width: 0;
  width: 100%;
}

/* Match the existing card typography when correcting heading levels. */
.library-theme .catalog-main .card-info h2 {
  font-size: 13px;
  line-height: 1.6;
  min-height: 43px;
  margin: 8px 0 16px;
  letter-spacing: -.2px;
}

.library-theme .catalog-main .card-info h2 a { display: block; }
.library-theme .referral h2 { font-size: 19px; line-height: 1.5; }
.library-theme .announcement-feed-heading h2 { font-size: 20px; line-height: 1.5; margin: 0; }
.library-theme .eq-empty h2 { font-size: 17px; color: #586b49; margin: 17px 0 10px; }

@media (max-width: 760px) {
  .library-theme .catalog-main .content-card .card-info h2 {
    font-size: 16px;
    line-height: 1.55;
    margin: 5px 0 10px;
    min-height: 0;
  }
  .library-theme .announcement-feed-heading h2 { font-size: 18px; }
}
