body[data-page='learn-index'] main#content {
  max-width: none;
  width: 100%;
  margin-inline: 0;
  padding: 0;
}
/* Learn's route-owned library layout. Shared palette and fonts come from the design system. */
.learn-library {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 32px 88px;
  color: var(--ts-ink);
}
.learn-library [hidden] {
  display: none !important;
}
.learn-library a {
  text-underline-offset: 0.2em;
}
.learn-library :is(a, button, input, select):focus-visible {
  outline: 3px solid var(--ts-focus, var(--ts-accent));
  outline-offset: 4px;
}
.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}
.library-eyebrow {
  margin: 0 0 8px;
  color: var(--ts-link, var(--ts-accent));
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.library-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.library-intro {
  max-width: 660px;
  margin: 12px 0 0;
  color: var(--ts-ink-soft);
  font-size: 17px;
  line-height: 1.55;
}
.library-help-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  color: var(--ts-ink);
  font-size: 15px;
  font-weight: 550;
  white-space: nowrap;
  text-decoration: none;
}
.library-help-link span {
  color: var(--ts-link, var(--ts-accent));
  font-size: 20px;
}
.library-search {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
}
.library-search__field {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 12px;
  border: 1px solid var(--ts-border-control, var(--ts-rule));
  border-radius: 12px;
  padding: 0 16px;
  background: var(--ts-surface);
  transition: border-color 0.15s;
}
.library-search__field:focus-within {
  border-color: var(--ts-link, var(--ts-accent));
  box-shadow: 0 0 0 1px var(--ts-accent);
}
.library-search__field > svg {
  flex: 0 0 auto;
  color: var(--ts-muted);
}
.library-search__field input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  margin: 0;
  padding: 12px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  outline: none;
  color: var(--ts-ink);
  font: inherit;
  font-size: 17px;
}
.library-search__field input:focus-visible {
  outline: none;
}
.library-search__field input::placeholder {
  color: var(--ts-muted);
  opacity: 1;
}
.library-search__field input::-webkit-search-cancel-button {
  display: none;
}
.library-search__clear {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--ts-ink-soft);
}
.library-search__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 20px;
  border: 1px solid var(--ts-action-bg, #047e3d);
  border-radius: 12px;
  background: var(--ts-action-bg, #047e3d);
  color: var(--ts-action-text, #fff);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.library-collections {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 5px;
  margin: 0 0 32px;
  border: 1px solid var(--ts-rule);
  border-radius: 12px;
  background: var(--ts-surface-raised);
}
.library-collections a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 17px;
  border-radius: 8px;
  color: var(--ts-ink-soft);
  font-size: 15px;
  font-weight: 550;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
}
.library-collections a[aria-current] {
  background: var(--ts-surface);
  color: var(--ts-ink);
  box-shadow: 0 1px 5px rgb(0 0 0 / 0.09);
}
.library-collections a[data-library-collection='setup'][aria-current] {
  background: var(--ts-action-bg, #047e3d);
  color: var(--ts-action-text, #fff);
}
.library-collections small {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.library-tag {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: -12px 0 24px;
  color: var(--ts-ink-soft);
  font-size: 14px;
}
.library-tag a {
  color: var(--ts-link, var(--ts-accent));
}
.library-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
.library-sidebar {
  position: sticky;
  top: 100px;
  min-width: 0;
}
.library-mobile-topic {
  display: none;
}
.library-topics {
  display: grid;
  gap: 3px;
}
.library-topics h2 {
  margin: 0 0 12px;
  padding: 0 12px;
  color: var(--ts-ink);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
}
.library-topics a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ts-ink-soft);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  scroll-margin-top: 110px;
}
.library-topics a[aria-current] {
  background: var(--ts-accent-a10, var(--ts-surface-raised));
  color: var(--ts-link, var(--ts-accent));
  font-weight: 600;
}
.library-topics small {
  font-size: 12px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.library-support {
  margin: 30px 12px 0;
  padding-top: 22px;
  border-top: 1px solid var(--ts-rule);
}
.library-support h2 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}
.library-support p {
  margin: 0 0 10px;
  color: var(--ts-ink-soft);
  font-size: 14px;
  line-height: 1.5;
}
.library-support a {
  color: var(--ts-link, var(--ts-accent));
  font-size: 14px;
  font-weight: 550;
}
.library-results {
  min-width: 0;
  scroll-margin-top: 100px;
}
.library-results__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  margin-bottom: 18px;
}
.library-results__header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.library-results__header p {
  margin: 5px 0 0;
  color: var(--ts-muted);
  font-size: 13px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.library-reset {
  color: var(--ts-link, var(--ts-accent));
  font-size: 13px;
  line-height: 1.4;
  font-weight: 550;
  text-align: end;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.library-card {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--ts-rule);
  border-radius: 12px;
  background: var(--ts-surface);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.library-card__link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  min-height: 180px;
  padding: 20px 20px 40px;
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
}
.library-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  align-items: center;
  color: var(--ts-muted);
  font-size: 12px;
  line-height: 1.4;
}
.library-card__meta .library-card__kind {
  color: var(--ts-link, var(--ts-accent));
  font-weight: 600;
}
.library-card__meta [data-library-language] {
  padding-left: 10px;
  border-left: 1px solid var(--ts-rule);
}
.library-card__body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.library-card__body > div {
  min-width: 0;
}
.library-card h3 {
  margin: 0;
  color: var(--ts-ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
  text-wrap: pretty;
}
.library-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 9px 0 0;
  color: var(--ts-ink-soft);
  font-size: 14px;
  line-height: 1.5;
}
.library-card img {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--ts-surface-raised);
}
.library-card__arrow {
  position: absolute;
  inset-inline-end: 20px;
  bottom: 14px;
  color: var(--ts-link, var(--ts-accent));
  font-size: 18px;
  line-height: 1;
}
.library-empty {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 44px 32px;
  border: 1px dashed var(--ts-rule);
  border-radius: 12px;
  background: var(--ts-surface);
}
.library-empty > svg {
  color: var(--ts-muted);
}
.library-empty h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.library-empty p {
  max-width: 440px;
  margin: 0;
  color: var(--ts-ink-soft);
  font-size: 15px;
  line-height: 1.6;
}
.library-empty a {
  color: var(--ts-link, var(--ts-accent));
  font-size: 15px;
  font-weight: 550;
}
.library-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ts-rule);
}
.library-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--ts-rule);
  border-radius: 8px;
  color: var(--ts-ink);
  background: var(--ts-surface);
  font-size: 14px;
  text-decoration: none;
}
.library-pagination a[aria-disabled] {
  pointer-events: none;
  opacity: 0.4;
}
.library-pagination > span {
  color: var(--ts-muted);
  font-size: 13px;
  text-align: center;
}
@media (hover: hover) {
  .library-card:hover {
    border-color: var(--ts-link, var(--ts-accent));
    box-shadow: 0 3px 12px rgb(0 0 0 / 0.04);
  }
  .library-collections a:not([aria-current]):hover,
  .library-topics a:not([aria-current]):hover,
  .library-search__clear:hover {
    background: var(--ts-surface-raised);
    color: var(--ts-ink);
  }
  .library-help-link:hover,
  .library-support a:hover,
  .library-reset:hover {
    text-decoration: underline;
  }
}
@media (max-width: 1050px) {
  .learn-library {
    padding-inline: 24px;
  }
  .library-layout {
    grid-template-columns: 178px minmax(0, 1fr);
    gap: 24px;
  }
  .library-card__link {
    padding: 18px 16px 36px;
  }
  .library-card img {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }
  .library-card__body {
    gap: 12px;
  }
}
@media (max-width: 800px) {
  .learn-library {
    padding: 28px 20px 72px;
  }
  .library-header {
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }
  .library-header h1 {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
  }
  .library-help-link {
    font-size: 14px;
    gap: 8px;
  }
  .library-intro {
    font-size: 16px;
  }
  .library-layout {
    display: block;
  }
  .library-sidebar {
    position: static;
    margin-bottom: 24px;
  }
  .library-topics,
  .library-support {
    display: none;
  }
  .library-mobile-topic {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .library-mobile-topic label {
    flex-shrink: 0;
    color: var(--ts-ink-soft);
    font-size: 14px;
    font-weight: 550;
  }
  .library-mobile-topic select {
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 9px 34px 9px 12px;
    border: 1px solid var(--ts-rule);
    border-radius: 8px;
    background-color: var(--ts-surface);
    color: var(--ts-ink);
    font: inherit;
    font-size: 14px;
  }
  .library-collections {
    margin-bottom: 24px;
  }
}
@media (max-width: 600px) {
  .library-mobile-topic {
    display: grid;
    gap: 8px;
  }
  .library-mobile-topic select {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
  }
  .learn-library {
    padding-inline: 18px;
  }
  .library-header {
    display: block;
    position: relative;
  }
  .library-eyebrow {
    padding-inline-end: 100px;
    font-size: 13px;
  }
  .library-help-link {
    position: absolute;
    inset-inline-end: 0;
    top: -12px;
    font-size: 13px;
  }
  .library-header h1 {
    margin-top: 14px;
    font-size: 31px;
    letter-spacing: -0.03em;
  }
  .library-intro {
    font-size: 16px;
    line-height: 1.5;
  }
  .library-search {
    gap: 6px;
    margin-bottom: 14px;
  }
  .library-search__field {
    padding-inline: 12px;
    gap: 8px;
  }
  .library-search__field input {
    font-size: 16px;
    min-height: 54px;
  }
  .library-search__field > svg {
    width: 19px;
  }
  .library-search__submit {
    flex: 0 0 50px;
    min-height: 54px;
    padding: 12px;
  }
  .library-search__submit span {
    display: none;
  }
  .library-collections {
    display: grid;
    grid-template-columns: 0.85fr 1.5fr 1fr;
    width: 100%;
    gap: 3px;
    padding: 4px;
  }
  .library-collections a {
    min-width: 0;
    min-height: 48px;
    padding: 7px 8px;
    font-size: 14px;
    text-wrap: balance;
  }
  .library-collections small {
    display: none;
  }
  .library-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .library-results__header h2 {
    font-size: 21px;
  }
  .library-card__link {
    min-height: 166px;
    gap: 12px;
    padding: 18px 18px 34px;
  }
  .library-card h3 {
    font-size: 18px;
    line-height: 1.35;
  }
  .library-card img {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
  }
  .library-empty {
    padding: 32px 22px;
  }
  .library-pagination {
    gap: 8px;
  }
  .library-pagination a {
    gap: 6px;
    padding: 9px 11px;
    font-size: 13px;
  }
  .library-pagination > span {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .learn-library *,
  .learn-library *::before {
    scroll-behavior: auto;
    transition: none;
  }
}

.library-card .ts-media-state {
  display: block;
  margin: 0;
  padding: 0;
  color: var(--ts-muted);
  font-size: 12px;
  line-height: 1.4;
}
.library-card .library-card__safety-note {
  display: block;
  margin: 0 0 8px;
  color: var(--ts-danger);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 550;
}
