/* Resource library only. Shared site tokens, navigation and footer stay in root.css. */
.library-main {
  width: 100%;
  overflow: clip;
}
.library-shell {
  width: var(--shell);
  margin-inline: auto;
}
.library-main section[id] {
  scroll-margin-top: 6rem;
}
.library-main h1 {
  max-width: 16ch;
  font-size: clamp(2.65rem, 4.8vw, 4.8rem);
  line-height: 1.06;
}
.library-main h1 span {
  color: var(--brand);
}
.library-main h2 {
  font-size: clamp(2rem, 3.7vw, 3.4rem);
  line-height: 1.08;
}
.library-main p {
  line-height: 1.65;
}
.library-main .button {
  font-size: 1rem;
  min-height: 3.5rem;
}
.library-kicker {
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.library-hero {
  padding: clamp(9rem, 13vw, 12rem) 0 clamp(4rem, 7vw, 7rem);
  background: radial-gradient(
    ellipse at 80% 40%,
    rgb(25 200 255 / 10%),
    transparent 50%
  );
}
.library-hero__layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-areas: "copy artwork" "browse browse";
  align-items: center;
  gap: 3rem;
}
.library-intro {
  max-width: 51ch;
  margin-top: 1.75rem;
  color: var(--text);
  font-size: 1.08rem;
}
.library-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  margin-top: 2rem;
}
.library-text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  text-decoration: none;
  font-size: 1rem;
  min-height: 44px;
  transition: color 0.3s;
}
.library-text-link:hover {
  color: var(--brand);
}
.library-text-link span {
  color: var(--brand);
}
.library-small {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.library-covers {
  position: relative;
  height: 410px;
  isolation: isolate;
}
.library-covers::after {
  position: absolute;
  bottom: 0;
  left: 8%;
  width: 84%;
  height: 40px;
  background: #000;
  filter: blur(25px);
  opacity: 0.5;
  content: "";
  z-index: -1;
}
.library-cover {
  position: absolute;
  width: 68%;
  height: 340px;
  padding: 1.5rem;
  border: 1px solid var(--line-brand);
  border-radius: 4px 12px 12px 4px;
  box-shadow:
    -5px 0 0 #23374a,
    0 15px 30px #0005;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: 50% 95%;
}
.library-cover > span:first-child {
  font-family: var(--headerFont);
  font-size: 1rem;
  color: var(--white);
}
.library-cover strong {
  margin-top: 1.75rem;
  font-family: var(--headerFont);
  font-size: clamp(1.3rem, 2.1vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--white);
}
.library-cover small {
  margin-top: auto;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text);
  position: relative;
}
.library-cover--back {
  left: 29%;
  top: 28px;
  background: #103a4c;
  transform: rotate(14deg);
}
.library-cover--middle {
  left: 13%;
  top: 12px;
  background: #183349;
  transform: rotate(-10deg);
}
.library-cover--front {
  left: 19%;
  top: 38px;
  background: linear-gradient(135deg, #071421, #0d2238);
  transform: rotate(3deg);
}
.library-cover--front strong {
  position: relative;
  z-index: 1;
}
.library-cover__orb {
  position: absolute;
  right: -35px;
  bottom: 35px;
  width: 180px;
  height: 180px;
  border: 1px solid var(--brand);
  border-radius: 50%;
  box-shadow:
    inset 0 0 25px #19c8ff55,
    0 0 30px #19c8ff22;
  background: repeating-radial-gradient(
    ellipse at 0% 50%,
    transparent 0 12px,
    #19c8ff44 13px,
    transparent 14px
  );
  opacity: 0.65;
}
.library-cover__lines {
  height: 80px;
  margin-top: 2rem;
  background: repeating-linear-gradient(
    transparent 0 12px,
    #ffffff20 13px,
    transparent 14px
  );
}
/* Equal routes into the two parts of the library, before the guide collection. */
.library-hero__copy {
  grid-area: copy;
}
.library-covers {
  grid-area: artwork;
}
.library-browse {
  grid-area: browse;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.library-browse__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--white);
  text-decoration: none;
  transition:
    border-color 0.3s,
    background-color 0.3s,
    transform 0.3s;
}
.library-browse__card:hover {
  border-color: var(--brand);
  background-color: #102537;
  transform: translateY(-3px);
}
.library-browse__card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 5px;
}
.library-browse__type {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.library-browse__title {
  font-family: var(--headerFont);
  font-size: clamp(1.6rem, 2.5vw, 2.25rem);
  line-height: 1.15;
}
.library-browse__description {
  display: block;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 47ch;
  margin: 1rem 0 1.75rem;
}
.library-browse__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  font-size: 1rem;
  color: var(--brand);
  margin-top: auto;
}
.library-browse__status {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}
.resources-page.library-guides {
  min-height: auto;
  padding: clamp(4.5rem, 8vw, 8rem) 0;
  background: transparent;
}
.resources-page.library-guides::before {
  display: none;
}
.library-section-heading {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: 3rem;
}
.library-section-heading > p {
  max-width: 43ch;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.library-guides .resources-page__grid {
  grid-auto-flow: dense;
}
.library-guides .resource-card {
  box-shadow: none;
  border-radius: var(--radius);
}
.library-guides .resource-card__tag {
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
  padding: 0;
  border: 0;
  background: transparent;
}
.library-guides .resource-card__meta {
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
}
.library-guides .resource-card__content h3 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.library-guides .resource-card__content h4 {
  font-size: 1rem;
  letter-spacing: 0;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}
.library-guides .resource-card p,
.library-guides .resource-card li {
  font-size: 1rem;
}
.library-guides .resource-card__icon {
  margin-top: 1.75rem;
}
.library-guides .resource-card__download {
  font-size: 1rem;
  box-shadow: none;
}
.library-journal {
  background: var(--ink-3);
  padding: clamp(4.5rem, 8vw, 8rem) 0;
}
.library-journal__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
}
.library-journal__intro p:not(.library-kicker) {
  margin: 1.5rem 0 2rem;
  max-width: 40ch;
}
.library-journal__preview {
  border-left: 1px solid #ffffff30;
  padding-left: clamp(2rem, 4vw, 4rem);
}
.library-status {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--brand);
  margin-bottom: 1.75rem;
}
.library-journal__preview h3 {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.library-journal__preview p {
  color: var(--text);
}
.library-topics {
  display: flex;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
  list-style: none;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ffffff20;
}
.library-topics li {
  font-size: 0.9rem;
  color: var(--white);
}
.library-cta {
  padding: clamp(4.5rem, 8vw, 8rem) 0;
  text-align: center;
  background: radial-gradient(ellipse at 50% 100%, #19c8ff0a, transparent 70%);
}
.library-cta p {
  max-width: 54ch;
  margin: 1.5rem auto 2rem;
}
.library-blog-hero {
  padding: clamp(9rem, 13vw, 12rem) 0 4rem;
  background: radial-gradient(ellipse at 90% 20%, #19c8ff13, transparent 60%);
}
.library-breadcrumb {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
  font-size: 0.9rem;
}
.library-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s;
}
.library-breadcrumb a:hover {
  color: var(--brand);
}
.library-blog-content {
  padding: 2rem 0 clamp(5rem, 8vw, 8rem);
}
.library-blog-empty {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  border-top: 1px solid var(--line);
  padding-top: 4rem;
}
.library-blog-empty > div > p:not(.library-kicker) {
  max-width: 43ch;
  margin: 1.5rem 0 2rem;
}
.library-reading-list h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.library-reading-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--white);
  text-decoration: none;
  line-height: 1.5;
  transition: color 0.3s;
}
.library-reading-list a:hover {
  color: var(--brand);
}
.library-reading-list small {
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 950px) {
  .library-hero__layout {
    gap: 1rem;
    grid-template-columns: 1.3fr 1fr;
  }
  .library-cover {
    width: 78%;
    height: 300px;
    padding: 1.25rem;
  }
  .library-cover--back {
    left: 15%;
  }
  .library-cover--middle {
    left: 4%;
  }
  .library-cover--front {
    left: 10%;
  }
  .library-covers {
    height: 350px;
  }
  .library-guides .resources-page__grid {
    max-width: none;
  }
  .library-guides .resource-card {
    padding: 2rem;
  }
  .library-journal__layout,
  .library-blog-empty {
    gap: 2.5rem;
  }
}
@media (max-width: 700px) {
  .library-hero__layout,
  .library-section-heading,
  .library-journal__layout,
  .library-blog-empty {
    grid-template-columns: 1fr;
  }
  .library-hero {
    padding-top: 9rem;
  }
  .library-hero h1 {
    max-width: 16ch;
  }
  .library-covers {
    height: 290px;
    width: min(320px, 90%);
    margin: 2rem auto 0;
  }
  .library-cover {
    height: 240px;
    padding: 1.15rem;
  }
  .library-cover strong {
    font-size: 1.35rem;
    margin-top: 1.2rem;
  }
  .library-cover__orb {
    width: 125px;
    height: 125px;
  }
  .library-cover small {
    font-size: 0.9rem;
  }
  .library-hero__layout {
    grid-template-areas: "copy" "artwork" "browse";
  }
  .library-browse {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.75rem;
  }
  .library-section-heading {
    gap: 1.5rem;
  }
  .library-section-heading > p {
    max-width: 100%;
  }
  .library-guides .resource-card {
    padding: 1.5rem;
  }
  .library-journal__preview {
    border-left: 0;
    border-top: 1px solid #ffffff30;
    padding: 2.5rem 0 0;
  }
  .library-actions {
    gap: 0.6rem 1.5rem;
  }
  .library-blog-empty {
    padding-top: 3rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .library-main *,
  .library-main *::before,
  .library-main *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Three equal routes into the library, including personal website feedback. */
.library-browse--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .library-browse--three { grid-template-columns: 1fr; }
}
