:root {
  --rc-purple: #6f4be8;
  --rc-purple-dark: #5d35cc;
  --rc-purple-soft: #815ff0;
  --rc-ink: #211c2a;
  --rc-muted: #6d6877;
  --rc-line: #e8e3f1;
  --rc-pale: #f7f4ff;
  --rc-pale-2: #efe9ff;
  --rc-white: #ffffff;
  --rc-shadow: 0 16px 45px rgba(76, 50, 137, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--rc-ink); }

.resource-cluster {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--rc-ink);
  font-size: 15px;
  line-height: 1.65;
  overflow: hidden;
}

.resource-cluster button,
.resource-cluster input { font: inherit; }
.resource-cluster a { color: inherit; }
.resource-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.resource-hero {
  position: relative;
  isolation: isolate;
  padding: 72px 0 62px;
  background:
    radial-gradient(circle at 15% 18%, rgba(129, 95, 240, .16), transparent 34%),
    radial-gradient(circle at 87% 10%, rgba(111, 75, 232, .12), transparent 28%),
    linear-gradient(180deg, #fbfaff 0%, #f6f2ff 100%);
  border-bottom: 1px solid #eee9fb;
}

.resource-hero__inner { position: relative; z-index: 1; text-align: center; max-width: 920px; }
.resource-hero__glow { position: absolute; width: 360px; height: 360px; border-radius: 50%; filter: blur(20px); opacity: .25; z-index: -1; }
.resource-hero__glow--one { background: #dcd0ff; left: -190px; top: 20px; }
.resource-hero__glow--two { background: #e9deff; right: -170px; bottom: -100px; }

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--rc-purple-dark);
  background: #eee8ff;
  border: 1px solid #dfd4ff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.resource-hero h1 {
  margin: 18px auto 14px;
  max-width: 780px;
  font-size: clamp(38px, 5.2vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  color: #1d1826;
}

.resource-hero__lead {
  max-width: 720px;
  margin: 0 auto;
  color: #625d6c;
  font-size: 17px;
  line-height: 1.75;
}

.hero-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(760px, 100%);
  margin: 32px auto 0;
  background: #fff;
  border: 1px solid #ddd5ef;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(70, 43, 138, .12);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.hero-search:focus-within { border-color: #8f72ed; box-shadow: 0 20px 56px rgba(70, 43, 138, .17); transform: translateY(-1px); }
.hero-search__icon { width: 56px; flex: 0 0 56px; font-size: 28px; color: var(--rc-purple); transform: translateY(-1px); }
.hero-search input { width: 100%; border: 0; outline: 0; color: #26212e; background: transparent; padding: 19px 66px 19px 0; font-size: 16px; }
.hero-search input::placeholder { color: #9993a5; }
.hero-search kbd { position: absolute; right: 17px; min-width: 30px; padding: 4px 8px; border: 1px solid #ddd6e8; border-bottom-width: 2px; border-radius: 7px; background: #faf9fc; color: #817a8a; font: 600 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.hero-search__clear { position: absolute; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f1ecfb; color: #6d5b9e; cursor: pointer; font-size: 21px; opacity: 0; pointer-events: none; transition: opacity .15s ease, background .15s ease; }
.hero-search__clear.is-visible { opacity: 1; pointer-events: auto; }
.hero-search__clear.is-visible + * { display:none; }
.hero-search:has(.hero-search__clear.is-visible) kbd { display:none; }
.hero-search__clear:hover { background: #e8dfff; }

.hero-meta { display:flex; justify-content:center; align-items:center; gap:11px; margin-top:18px; color:#777181; font-size:13px; }
.hero-meta__item strong { color:#4e3a86; }
.hero-meta__dot { width:4px; height:4px; border-radius:50%; background:#b6abc9; }
.hero-meta__status.is-warning { color:#8c641f; }

.browse-section { padding: 76px 0 82px; background:#fff; }
.section-heading { text-align:center; max-width:720px; margin:0 auto 34px; }
.section-heading h2 { margin:14px 0 7px; font-size:clamp(29px, 3vw, 38px); line-height:1.2; letter-spacing:-.032em; }
.section-heading p { margin:12px auto 0; color:var(--rc-muted); max-width:650px; }
.section-underline { display:block; width:58px; height:3px; margin:13px auto 0; border-radius:99px; background:linear-gradient(90deg, var(--rc-purple), #a48bf4); }
.section-heading--left { text-align:left; margin:0; }
.section-heading--left .section-underline { margin-left:0; }

.category-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:16px; }
.category-tile {
  position:relative;
  min-height:126px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) 96px;
  align-items:center;
  gap:18px;
  padding:23px 22px;
  border:1px solid var(--rc-line);
  border-radius:18px;
  background:linear-gradient(145deg, #fff 0%, #fdfcff 100%);
  color:var(--rc-ink);
  text-align:left;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(63,43,101,.035);
  overflow:hidden;
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.category-tile::before { content:""; position:absolute; width:112px; height:112px; right:-45px; top:-45px; border-radius:50%; background:#f6f2ff; opacity:.85; transition:transform .2s ease, background .2s ease; }
.category-tile:hover, .category-tile:focus-visible { transform:translateY(-3px); border-color:#b7a3f2; box-shadow:0 15px 32px rgba(83,54,148,.1); outline:none; }
.category-tile:hover::before, .category-tile:focus-visible::before { transform:scale(1.08); background:#f0eaff; }
.category-tile.is-active { border-color:#a891ef; background:#faf8ff; box-shadow:0 14px 34px rgba(83,54,148,.1); }
.category-tile__copy { position:relative; z-index:1; display:flex; flex-direction:column; min-width:0; padding-right:4px; }
.category-tile__copy strong { font-size:16px; color:#282230; }
.category-tile__copy span { margin-top:3px; color:#817b88; font-size:12px; }
.category-tile__illustration { position:relative; z-index:1; display:block; width:96px; height:64px; color:#8269ce; opacity:.9; transition:transform .2s ease, color .2s ease; }
.category-tile__illustration svg { display:block; width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke; }
.category-tile:hover .category-tile__illustration, .category-tile:focus-visible .category-tile__illustration { transform:translateY(-2px); color:#6f4be8; }
.category-tile__arrow { position:absolute; z-index:2; right:15px; bottom:11px; color:#9b8ac9; font-size:16px; transition:transform .18s ease, color .18s ease; }
.category-tile:hover .category-tile__arrow { transform:translateX(3px); color:#6f4be8; }
.category-tile--skeleton { cursor:default; }
.category-tile--skeleton::before { display:none; }

.library-section { scroll-margin-top:12px; padding:80px 0 92px; background:linear-gradient(180deg, #faf8ff 0%, #f7f4ff 100%); border-top:1px solid #f0ebf9; border-bottom:1px solid #eee9f7; }
.library-heading-row { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom:30px; }
.sitemap-link { flex:0 0 auto; text-decoration:none; color:#6d59ad !important; font-size:13px; font-weight:700; padding:9px 0; }
.sitemap-link:hover { color:var(--rc-purple-dark) !important; }

.library-toolbar { position:sticky; top:10px; z-index:5; display:flex; align-items:center; gap:16px; padding:12px; margin-bottom:18px; background:rgba(255,255,255,.93); backdrop-filter:blur(14px); border:1px solid #e4ddec; border-radius:16px; box-shadow:0 10px 28px rgba(72,48,122,.07); }
.filter-scroll { min-width:0; display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; }
.filter-scroll::-webkit-scrollbar { display:none; }
.filter-chip { flex:0 0 auto; border:1px solid #e5dfed; border-radius:999px; background:#fff; color:#655f6d; padding:8px 12px; cursor:pointer; font-size:13px; font-weight:700; transition:background .16s ease, border-color .16s ease, color .16s ease; }
.filter-chip span { margin-left:4px; color:#928b9a; font-size:11px; }
.filter-chip:hover, .filter-chip:focus-visible { border-color:#b9a9e8; color:#5d43a6; outline:none; }
.filter-chip.is-active { border-color:var(--rc-purple); background:var(--rc-purple); color:#fff; }
.filter-chip.is-active span { color:#e9e1ff; }
.results-count { margin-left:auto; flex:0 0 auto; padding:0 7px; color:#77717f; font-size:12px; }
.results-count strong { color:#4f4770; }

.active-search { display:none; align-items:center; justify-content:space-between; gap:16px; margin:0 2px 18px; padding:10px 14px; border-radius:12px; background:#eee8ff; color:#665c7b; font-size:13px; }
.active-search.is-visible { display:flex; }
.active-search button { border:0; background:transparent; color:var(--rc-purple-dark); font-weight:800; cursor:pointer; }

.resource-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:18px; }
.resource-card { position:relative; min-height:282px; display:flex; flex-direction:column; padding:22px; border:1px solid #e3ddeb; border-radius:20px; background:#fff; box-shadow:0 7px 21px rgba(67,44,111,.045); overflow:hidden; transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.resource-card::after { content:""; position:absolute; width:92px; height:92px; right:-38px; top:-37px; border-radius:50%; background:#f1ecff; transition:transform .2s ease, background .2s ease; }
.resource-card:hover { transform:translateY(-3px); border-color:#b8a5ef; box-shadow:0 17px 38px rgba(77,50,139,.1); }
.resource-card:hover::after { transform:scale(1.08); background:#eae1ff; }
.resource-card__top { position:relative; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:10px; }
.resource-card__category { display:inline-flex; align-items:center; gap:7px; color:#6346b6; background:#f2edff; border-radius:999px; padding:5px 9px; font-size:11px; font-weight:800; }
.resource-card__type { color:#aaa3b2; font-size:11px; font-weight:650; text-transform:uppercase; letter-spacing:.04em; }
.resource-card__title { position:relative; z-index:1; margin:20px 0 8px; color:#29232f; font-size:19px; line-height:1.3; letter-spacing:-.015em; }
.resource-card__description { position:relative; z-index:1; margin:0 0 24px; color:#746e7b; font-size:13.5px; line-height:1.65; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.resource-card__footer { position:relative; z-index:1; margin-top:auto; padding-top:15px; border-top:1px solid #eeeaf3; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.resource-card__slug { min-width:0; max-width:52%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#a39ba9; font:500 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.resource-card__link { flex:0 0 auto; text-decoration:none; color:var(--rc-purple-dark) !important; font-size:13px; font-weight:800; }
.resource-card__link span { display:inline-block; transition:transform .18s ease; }
.resource-card:hover .resource-card__link span { transform:translateX(3px); }
.resource-card__link:focus-visible { outline:2px solid #9076e7; outline-offset:4px; border-radius:3px; }

.empty-state { grid-column:1 / -1; min-height:300px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:44px 20px; border:1px dashed #cfc2eb; border-radius:20px; background:rgba(255,255,255,.65); }
.empty-state__icon { display:grid; place-items:center; width:54px; height:54px; border-radius:50%; background:#eee8ff; color:#7257c5; font-size:26px; }
.empty-state h3 { margin:14px 0 4px; font-size:19px; }
.empty-state p { max-width:440px; margin:0 0 18px; color:#77717e; }
.button { border:0; border-radius:10px; background:var(--rc-purple); color:#fff; padding:10px 16px; font-weight:800; cursor:pointer; }
.button:hover { background:var(--rc-purple-dark); }
.button--secondary { background:#eee8ff; color:#6244b4; }
.button--secondary:hover { background:#e4d9ff; }

.tools-section { padding:76px 0 42px; background:#fff; }
.related-tools-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:16px; }
.related-tool-card { position:relative; min-height:154px; display:flex; align-items:flex-start; gap:16px; padding:22px 44px 22px 24px; border:1px solid #e5dfed; border-radius:18px; background:#fff; color:var(--rc-ink) !important; text-decoration:none; box-shadow:0 6px 18px rgba(63,43,101,.035); overflow:hidden; transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.related-tool-card__accent { position:absolute; left:0; top:24px; width:3px; height:42px; border-radius:0 6px 6px 0; background:#b8a5ef; transition:height .18s ease, background .18s ease; }
.related-tool-card__body { display:flex; flex-direction:column; gap:7px; }
.related-tool-card__body strong { color:#2a2432; font-size:16px; line-height:1.35; }
.related-tool-card__body span { color:#766f7d; font-size:13px; line-height:1.6; }
.related-tool-card__arrow { position:absolute; right:20px; bottom:18px; color:#7a60c9; font-size:19px; transition:transform .18s ease; }
.related-tool-card:hover, .related-tool-card:focus-visible { transform:translateY(-2px); border-color:#b8a5ef; box-shadow:0 14px 30px rgba(77,50,139,.09); outline:none; }
.related-tool-card:hover .related-tool-card__accent, .related-tool-card:focus-visible .related-tool-card__accent { height:64px; background:#6f4be8; }
.related-tool-card:hover .related-tool-card__arrow, .related-tool-card:focus-visible .related-tool-card__arrow { transform:translateX(3px); }

.about-section { padding:30px 0 88px; background:#fff; }
.about-card { display:grid; grid-template-columns:.9fr 1.1fr; gap:52px; align-items:center; padding:38px 42px; border:1px solid #e7e1ef; border-radius:22px; background:linear-gradient(135deg, #fff 0%, #faf8ff 100%); box-shadow:var(--rc-shadow); }
.about-card h2 { margin:13px 0 0; font-size:30px; line-height:1.22; letter-spacing:-.03em; }
.about-card p { margin:0; color:#706a78; }

.library-error { margin:56px auto 78px; display:grid; grid-template-columns:auto 1fr auto; gap:18px; align-items:center; padding:24px; border:1px solid #edd7d7; border-radius:18px; background:#fff9f9; }
.library-error__icon { display:grid; place-items:center; width:42px; height:42px; border-radius:50%; background:#fee7e7; color:#a94c4c; font-weight:900; }
.library-error h2 { margin:0 0 2px; font-size:18px; }
.library-error p { margin:0; color:#806d6d; font-size:13px; }

.skeleton { display:block; border-radius:9px; background:linear-gradient(90deg, #eeeaf4 25%, #f8f6fb 45%, #eeeaf4 65%); background-size:260% 100%; animation:skeleton 1.4s infinite linear; }
.skeleton--badge { width:96px; height:24px; }
.skeleton--title { width:72%; height:22px; margin-top:24px; }
.skeleton--line { width:100%; height:13px; margin-top:14px; }
.skeleton--short { width:66%; margin-top:8px; }
.skeleton--button { width:90px; height:16px; margin-top:auto; }
.skeleton--tile { width:100%; height:62px; }
.skeleton--filters { width:520px; max-width:70vw; height:36px; }
@keyframes skeleton { from { background-position:100% 0; } to { background-position:-100% 0; } }

@media (max-width: 980px) {
  .category-grid, .resource-grid, .related-tools-grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .about-card { gap:34px; }
}

@media (max-width: 700px) {
  .resource-shell { width:min(100% - 28px, 1180px); }
  .resource-hero { padding:50px 0 46px; }
  .resource-hero h1 { font-size:37px; letter-spacing:-.04em; }
  .resource-hero__lead { font-size:15px; }
  .hero-search { margin-top:25px; border-radius:15px; }
  .hero-search__icon { width:48px; flex-basis:48px; font-size:24px; }
  .hero-search input { padding-block:16px; font-size:15px; }
  .hero-search kbd { display:none; }
  .hero-meta { flex-wrap:wrap; row-gap:5px; }
  .browse-section, .library-section, .tools-section { padding:62px 0 70px; }
  .category-grid, .resource-grid, .related-tools-grid { grid-template-columns:1fr; }
  .category-tile { min-height:110px; grid-template-columns:minmax(0,1fr) 84px; padding:18px 19px; }
  .category-tile__illustration { width:84px; height:58px; }
  .category-tile:hover, .category-tile:focus-visible, .resource-card:hover, .related-tool-card:hover, .related-tool-card:focus-visible { transform:none; }
  .library-heading-row { align-items:flex-start; flex-direction:column; gap:4px; }
  .sitemap-link { margin-top:4px; }
  .library-toolbar { top:6px; margin-inline:-2px; padding:9px; }
  .results-count { display:none; }
  .resource-card { min-height:245px; padding:20px; }
  .resource-card__description { -webkit-line-clamp:3; }
  .resource-card__footer { align-items:flex-end; }
  .resource-card__slug { max-width:45%; }
  .tools-section { padding-bottom:34px; }
  .about-section { padding:28px 0 72px; }
  .about-card { grid-template-columns:1fr; gap:18px; padding:28px 24px; }
  .about-card h2 { font-size:27px; }
  .library-error { grid-template-columns:auto 1fr; }
  .library-error .button { grid-column:1 / -1; width:100%; }
}

@media (max-width: 430px) {
  .resource-hero h1 { font-size:34px; }
  .hero-meta__dot { display:none; }
  .hero-meta { flex-direction:column; }
  .category-tile { grid-template-columns:minmax(0,1fr) 76px; }
  .category-tile__illustration { width:76px; height:54px; }
  .resource-card__top { align-items:flex-start; }
  .resource-card__type { display:none; }
  .resource-card__footer { gap:8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  .resource-cluster *, .resource-cluster *::before, .resource-cluster *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}
