
a {
  color: var(--indigo);
  text-underline-offset: 0.3em;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
select {
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  transform: translateY(-200%);
  padding: 10px 16px;
  background: var(--card);
  z-index: 10;
}
.skip-link:focus {
  transform: none;
}

.library {
  max-width: 1080px;
  margin: 0 auto;
  padding: 96px 32px 0;
}


.search-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0 56px;
}
.search-home h1 {
  width: min(760px, 100%);
  margin: 0;
  font-weight: 400;
}
.doodle {
  position: relative;
  display: block;
  aspect-ratio: 760 / 250;
  text-decoration: none;
}
.doodle canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.18s ease-out;
}

.doodle.drawn canvas {
  opacity: 1;
}
.doodle-word {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5.6%;
  font: 400 clamp(64px, 19.7vw, 150px)/0.7 var(--pixel);
  text-align: center;
  color: var(--indigo);
  
  animation: doodle-fallback 0s 3s both;
}
@keyframes doodle-fallback {
  from { visibility: hidden; }
  to { visibility: visible; }
}
.doodle.drawn .doodle-word {
  display: none;
}
.doodle.failed .doodle-word {
  animation: none;
  visibility: visible;
}
@media (prefers-reduced-motion: reduce) {
  .doodle canvas { transition: none; }
}
.wordmark-label {
  position: absolute;
  right: 6%;
  bottom: -6px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.search-form {
  width: min(624px, 100%);
  margin-top: 36px;
}
.search-input-wrap {
  position: relative;
}
.search-input-wrap svg {
  position: absolute;
  top: 18px;
  left: 18px;
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.6;
  pointer-events: none;
}
.search-input-wrap input {
  display: block;
  width: 100%;
  height: 56px;
  padding: 0 20px 0 52px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-1);
  font-size: 18px;
  outline: none;
}
.search-input-wrap input:focus {
  border-color: var(--indigo);
  box-shadow: var(--shadow-card);
}
.search-input-wrap input::placeholder {
  color: var(--ink-2);
  opacity: 1;
}
.search-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.type-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}
.type-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .type-tabs a:hover {
    background: var(--card);
  }
}
.tab-count {
  font: 500 12px/1 var(--mono);
  color: var(--ink-2);
}

.type-tabs [aria-current] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.type-tabs [aria-current] .tab-count {
  color: var(--paper);
}
.type-tabs svg { width: 16px; height: 16px; flex: none; margin-right: -2px; }
.tab-guides    { --tab: #006650; --tab-bg: #C4F4E9; --tab-mark: #009D84; }
.tab-prompts   { --tab: #2E40A3; --tab-bg: #DAE7FF; --tab-mark: #5C77DF; }
.tab-skills    { --tab: #8B0F49; --tab-bg: #FFDAE6; --tab-mark: #C94F7C; }
.tab-playbooks { --tab: #904300; --tab-bg: #FFE3AB; --tab-mark: #E89800; }
.type-tabs [class^="tab-"] svg { color: var(--tab-mark); }
.type-tabs [class^="tab-"][aria-current] { color: var(--tab); background: var(--tab-bg); border-color: var(--tab-bg); }
.type-tabs [class^="tab-"][aria-current] svg,
.type-tabs [class^="tab-"][aria-current] .tab-count { color: var(--tab); }
.tab-label-short {
  display: none;
}


.results {
  max-width: 820px;
  margin: 0 auto;
  scroll-margin-top: 12px;
}
.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
  font: 13px/1.4 var(--mono);
  color: var(--ink-2);
}
.results-bar p {
  margin: 0;
  overflow-wrap: anywhere;
}
.results-bar strong {
  font-weight: 500;
  color: var(--ink);
}
.sort-form {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.sort-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.sort-select {
  
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 36px;
  gap: 8px;
  padding: 0 16px;   
  border: 1px solid var(--rule-2);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1 var(--sans);
  white-space: nowrap;
  transition: border-color 150ms ease;
}
.sort-select:hover { border-color: var(--ink-2); }
.sort-select:focus-within { outline: 2px solid var(--indigo); outline-offset: 4px; }
.sort-form .sort-select select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font: 14px var(--sans);
}
.sort-select select:focus-visible { outline: none; }
.sort-select svg {
  flex: none;
  width: 12px;
  height: 12px;
  pointer-events: none;
  color: var(--ink-2);
}
.library .sort-form .sort-submit {
  display: none;
}
.result-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.result {
  display: flex;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule-2);
}
.result-kw {
  flex: none;
  width: 168px;
  text-decoration: none;
}
.result-kw b {
  display: block;
  font: 400 34px/0.9 var(--pixel);
  letter-spacing: 0.02em;
  color: var(--indigo);
  word-break: break-all;
}
.result-kw small {
  display: block;
  margin-top: 8px;
  font: 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.result-body {
  min-width: 0;
}
.result h2 {
  margin: 0 0 6px;
  font: 400 21px/1.25 var(--sans);
  letter-spacing: -0.01em;
}
.result h2 a {
  color: var(--ink);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .result:hover h2 a {
    color: var(--indigo);
    text-decoration: underline;
    text-underline-offset: 0.3em;
  }
}
.result-url {
  margin: 0 0 10px;
  font: 12px/1.4 var(--mono);
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.result-description {
  margin: 0;
  font-size: 15px;
  line-height: 24px;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result-empty {
  display: block;
  padding: 48px 0;
}
.result-empty .result-description {
  display: block;
  margin-bottom: 12px;
  font-size: 17px;
}
.result-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
}

.resource-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--r-xs, 6px);
  font: 500 12px/20px var(--sans);
  letter-spacing: normal;
  white-space: nowrap;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-image 125ms cubic-bezier(0.24, 1, 0.4, 1);
}

@media (hover: hover) {
  a.resource-badge:hover { background-image: linear-gradient(rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.05)); }
}
@media not (pointer: coarse) {
  a.resource-badge:active { background-image: linear-gradient(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.1)); }
}
a.resource-badge[data-press="on"] { background-image: linear-gradient(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.1)); }
a.resource-badge:focus { outline: none; }
a.resource-badge:focus-visible {
  background-image: linear-gradient(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.1));
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 0.24), inset 0 -1px 0 rgb(255 255 255 / 0.2);
}

@media (pointer: coarse) {
  a.resource-badge::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: max(100%, 44px);
    height: 44px;
    transform: translate(-50%, -50%);
  }
}
.resource-badge svg {
  width: 16px;
  height: 16px;
  flex: none;
}


.badge-guides    { color: #006650; background-color: #C4F4E9; }
.badge-prompts   { color: #2E40A3; background-color: #DAE7FF; }
.badge-skills    { color: #8B0F49; background-color: #FFDAE6; }
.badge-playbooks { color: #904300; background-color: #FFE3AB; }

.badge-file      { color: var(--ink-2); background-color: rgb(0 0 0 / 0.06); }
.resource-version,
.result-meta time {
  font: 12px/1 var(--mono);
  color: var(--ink-2);
}

.pagination {
  padding: 40px 0 0;
}
.page-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 15px;
}
.page-links a,
.page-disabled {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .page-links a:hover {
    background: var(--card);
  }
}
.page-links [aria-current] {
  background: var(--indigo);
  color: #fff;
}
.page-disabled {
  color: var(--ink-3);
}
.library-footer {
  max-width: 1080px;
  margin: 80px auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding: 28px 32px 40px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
}

@media (max-width: 720px) {
  .library {
    padding: 76px 16px 0;
  }
  .search-home {
    padding: 16px 0 40px;
  }
  .search-input-wrap input {
    font-size: 16px;
  }
  .result {
    flex-direction: column;
    gap: 12px;
  }
  .result-kw {
    width: auto;
  }
  .result-kw b {
    font-size: 28px;
  }
  .page-links a,
  .page-disabled {
    min-width: 36px;
    padding: 0 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
