:root {
  color-scheme: light;
  --ink: #171a13;
  --muted: #596051;
  --dark: #131510;
  --paper: #f8f9f4;
  --line: #e3e6db;
  --lime: #d4f54a;
  --green: #43570b;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-inline-size: 280px; margin: 0; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #779714; outline-offset: 3px; }
[hidden] { display: none !important; }
svg { display: block; flex: 0 0 auto; }
::selection { background: #d8f37a; color: #19220b; }

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link { position: fixed; z-index: 10; top: .6rem; left: .6rem; padding: .6rem 1rem; border-radius: .5rem; background: var(--lime); }
.frame { width: min(100% - 6.5rem, 77rem); margin-inline: auto; }

.site-header { background: var(--dark); color: #f5f6f0; border-bottom: 1px solid #30342a; }
.header-inner { min-height: 4.375rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; width: fit-content; font-size: 1.25rem; font-weight: 750; letter-spacing: -.055em; }
.wordmark img { display: block; flex-shrink: 0; }
.wordmark-accent { color: var(--lime); }
.primary-nav { display: flex; align-items: center; gap: 1.8rem; height: 100%; }
.primary-nav a { position: relative; display: flex; align-items: center; align-self: stretch; padding: .25rem .48rem 0; color: #aeb2a4; font-size: .915rem; font-weight: 600; white-space: nowrap; }
.primary-nav a:hover, .primary-nav a[aria-current] { color: #f7f8f0; }
.primary-nav a[aria-current]::after { position: absolute; content: ""; bottom: -1px; inset-inline: .48rem; height: 2px; border-radius: 2px 2px 0 0; background: var(--lime); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: .58rem; }
.language-menu { position: relative; z-index: 5; color: #dce2ce; }
.language-menu summary { display: inline-flex; align-items: center; gap: .42rem; min-height: 2.25rem; padding: .45rem .58rem; border: 1px solid #363b2d; border-radius: .55rem; background: #1d2018; font-size: .82rem; font-weight: 680; cursor: pointer; white-space: nowrap; }
.language-menu summary::-webkit-details-marker { display: none; }
.language-menu summary:hover, .language-menu[open] summary { border-color: #727e49; color: var(--lime); }
.language-menu summary:focus-visible { outline: 2px solid #a7cc36; outline-offset: 3px; }
.language-menu ul { min-width: 12rem; position: absolute; top: calc(100% + .45rem); right: 0; margin: 0; padding: .36rem; list-style: none; background: #21251a; border: 1px solid #424839; border-radius: .65rem; box-shadow: 0 .8rem 1.55rem #080a06ab; }
.language-menu a { display: flex; align-items: center; justify-content: space-between; min-height: 2.35rem; padding: .45rem .55rem; border-radius: .35rem; color: #e8ebdf; font-size: .86rem; }
.language-menu a:hover, .language-menu a[aria-current] { background: #333d22; color: var(--lime); }
.saved-nav { display: inline-flex; align-items: center; gap: .47rem; padding: .54rem .78rem; min-height: 2.25rem; color: #ebede4; background: #1d2018; border: 1px solid #363b2d; border-radius: .55rem; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.saved-nav:hover, .saved-nav[aria-current] { color: var(--lime); border-color: #727e49; }
.saved-number { background: var(--lime); color: #20280d; border-radius: .35rem; min-width: 1.3rem; padding-inline: .25rem; text-align: center; font-size: .75rem; }

.hero { background: var(--dark); color: #f6f8ef; overflow: hidden; }
.hero-inner { min-height: 30.1rem; position: relative; display: flex; align-items: center; isolation: isolate; }
.hero-art {
  width: min(61rem, 76%);
  height: min(39rem, 132%);
  position: absolute;
  z-index: -1;
  right: -7.2%;
  top: 50%;
  transform: translateY(-50%);
  background: url('assets/atlas-globe.jpg') center / contain no-repeat;
  mix-blend-mode: lighten;
  mask-image: radial-gradient(ellipse 59% 58% at 50% 50%, #000 55%, transparent 100%);
  pointer-events: none;
}
.hero-content { padding: 3.125rem 0 3.45rem; }
.eyebrow { display: inline-flex; gap: .48rem; align-items: center; margin-bottom: 1.18rem; border: 1px solid #454d2d; border-radius: 3rem; padding: .4rem .72rem; color: var(--lime); background: #232918; font-size: .825rem; font-weight: 640; letter-spacing: .065em; }
.eyebrow svg { width: .93rem; height: .93rem; }
.hero h1 { margin: 0; font-size: clamp(3.175rem, 5.5vw, 5rem); font-weight: 785; line-height: 1.03; letter-spacing: -.074em; }
html:lang(zh) .hero h1, html:lang(ja) .hero h1 { line-height: 1.12; letter-spacing: -.035em; }
html:lang(fr) .hero h1, html:lang(ja) .hero h1 { font-size: clamp(2.9rem, 5vw, 4.35rem); }
.hero h1 em { color: var(--lime); font-style: normal; }
.hero p { max-width: 28rem; margin: 1.2rem 0 1.55rem; color: #bdc2b0; font-size: 1.06rem; line-height: 1.65; letter-spacing: .006em; }
html:lang(zh) .hero p, html:lang(ja) .hero p { max-width: 32rem; }

.search-form { width: min(31rem, 100%); min-height: 3.24rem; position: relative; display: flex; align-items: center; gap: .58rem; padding: .3rem; border: 1px solid #454a3a; border-radius: .67rem; background: #242820; }
.search-form:focus-within { border-color: #9fb348; box-shadow: 0 0 0 3px #d4f54a24; }
.search-icon { margin-inline: .54rem 0; color: #abb49c; }
.search-form input { flex: 1 1 5rem; min-width: 0; background: transparent; color: #f6f7ef; border: 0; padding: .24rem 0; outline: 0; font-size: .95rem; }
.search-form input:focus-visible { outline: 0; }
.search-form input::-webkit-search-cancel-button { appearance: none; }
.search-form input::placeholder { color: #aeb5a1; }
.search-clear { display: grid; place-items: center; background: transparent; border: 0; color: #d3d9c8; padding: .25rem; border-radius: .3rem; }
.search-clear:hover { color: var(--lime); }
.search-submit { border: 0; border-radius: .44rem; min-height: 2.53rem; padding-inline: 1.12rem; background: var(--lime); color: #18200b; font-size: .92rem; font-weight: 740; white-space: nowrap; }
.search-submit:hover { background: #e3ff7b; }
.quick-search { display: flex; align-items: center; gap: .5rem; margin-top: .95rem; color: #aab09f; font-size: .81rem; }
.quick-search > span { margin-right: .18rem; }
.quick-search button { color: #d5d9cc; background: #1e2219; border: 1px solid #363c2d; border-radius: .35rem; padding: .275rem .52rem; line-height: 1.15; }
.quick-search button:hover { color: var(--lime); border-color: #7a8a43; }

.directory { padding-block: 3.25rem 4.4rem; scroll-margin-top: .25rem; min-height: 30rem; }
.directory-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding-bottom: 1.48rem; border-bottom: 1px solid var(--line); }
.section-rule { width: 1.9rem; height: 3px; background: #a6be3e; border-radius: 1em; }
.directory h2 { margin: .47rem 0 0; font-size: clamp(1.9rem, 3.4vw, 2.65rem); line-height: 1.18; letter-spacing: -.065em; }
.directory h2:focus { outline: 0; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: .42rem; border: 0; padding: .35rem 0; background: transparent; color: var(--muted); font-size: .84rem; font-weight: 650; white-space: nowrap; }
.text-button:hover { color: #3e5401; text-decoration: underline; text-underline-offset: .2em; }

.directory-layout { display: grid; grid-template-columns: 12.5rem minmax(0, 1fr); gap: 2.05rem; padding-top: 1.35rem; }
.category-panel h3 { margin: .62rem 0 .65rem .63rem; color: #5e6555; font-size: .83rem; font-weight: 700; }
.categories { display: grid; gap: .23rem; }
.category-button { display: grid; width: 100%; grid-template-columns: 1.1rem minmax(0, 1fr) auto; align-items: center; gap: .42rem; min-height: 2.63rem; padding: .47rem .58rem; color: #505847; border: 1px solid transparent; border-radius: .55rem; background: transparent; text-align: left; font-size: .84rem; font-weight: 600; }
.category-button:hover { background: #edf0e5; }
.category-button[aria-pressed="true"] { color: #354601; background: #edf5cf; border-color: #e3edbb; font-weight: 720; }
.category-count { font: 600 .75rem/1 Consolas, monospace; color: #647056; }
.category-note { display: flex; align-items: flex-start; gap: .47rem; margin: 1.05rem .62rem 0; padding-top: 1rem; border-top: 1px solid var(--line); color: #626a59; font-size: .78rem; line-height: 1.5; }
.category-note svg { color: #587517; }
.category-note time { display: block; margin-top: .23rem; font: .75rem/1.4 Consolas, monospace; letter-spacing: .02em; color: #6c7463; }

.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; min-height: 2.55rem; }
.results-toolbar p { margin: 0; color: var(--muted); font-size: .9rem; }
.results-toolbar strong { color: var(--ink); font-size: 1rem; font-weight: 720; margin-right: .55rem; }
.results-toolbar p > span { white-space: nowrap; }
.sort-control { position: relative; display: inline-flex; align-items: center; flex: 0 0 auto; color: #48503e; }
.sort-control select { appearance: none; background: #fff; border: 1px solid #dfe4d7; border-radius: .5rem; color: inherit; padding: .58rem 1.75rem .58rem 1.94rem; font-size: .84rem; min-height: 2.38rem; max-width: 100%; text-overflow: ellipsis; }
.sort-icon, .sort-chevron { position: absolute; pointer-events: none; left: .57rem; }
.sort-chevron { left: auto; right: .52rem; }
.active-query { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: -.15rem 0 .85rem; color: var(--muted); font-size: .87rem; }
.query-pill { display: inline-flex; align-items: center; gap: .28rem; color: #3f5408; background: #edf5cf; border: 1px solid #dce8ae; border-radius: .35rem; padding: .25rem .45rem; overflow-wrap: anywhere; }

.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.card { --accent: #4d6410; --tile: #e9f3c9; position: relative; display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid #dfe4d8; border-radius: .83rem; padding: 1.03rem 1.03rem 0; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.card:hover, .card:focus-within { border-color: #b6c58e; box-shadow: 0 .55rem 1.5rem #29301a0e; }
@media (hover: hover) { .card:hover { transform: translateY(-2px); } }
.tone-purple { --accent: #6d47b2; --tile: #eee7fc; }
.tone-peach { --accent: #a24f32; --tile: #fae9df; }
.tone-blue { --accent: #37649b; --tile: #e6effa; }
.tone-mint { --accent: #24755d; --tile: #e2f2e9; }
.card-top { display: flex; align-items: center; gap: .7rem; min-height: 2.63rem; }
.resource-icon { flex: 0 0 auto; width: 2.65rem; height: 2.65rem; display: grid; place-items: center; border-radius: .63rem; background: var(--tile, #e9f3c9); color: var(--accent, #4d6410); }
.resource-icon svg { width: 1.28rem; height: 1.28rem; }
.type-label { color: #56624a; background: #f1f4eb; border: 1px solid #e9eddf; border-radius: .33rem; padding: .21rem .39rem; font-size: .74rem; font-weight: 650; line-height: 1.15; }
.skill-label { color: #60469a; background: #f2edf9; border-color: #eee8f7; }
.bookmark-button { display: grid; align-items: center; justify-items: center; flex: 0 0 auto; width: 2.3rem; height: 2.3rem; margin-left: auto; border: 1px solid transparent; border-radius: .5rem; background: transparent; color: #626b58; }
.bookmark-button:hover { background: #f2f5e9; color: #3c5210; }
.bookmark-button[aria-pressed="true"] { color: #47600e; background: #edf5d5; }
.bookmark-button[aria-pressed="true"] svg { fill: #cce482; }
.card h3 { margin: .8rem 0 .42rem; font-size: 1.135rem; line-height: 1.2; letter-spacing: -.032em; overflow-wrap: anywhere; }
.card-title { padding: 0; border: 0; background: none; text-align: left; font: inherit; }
.card-title:hover { color: #475d0f; text-decoration: underline; text-underline-offset: .15em; }
.card-description { flex: 1 0 auto; margin: 0 0 .83rem; color: #565f4e; min-height: 2.95em; font-size: .92rem; line-height: 1.55; }
.tags { display: flex; align-items: center; flex-wrap: wrap; gap: .32rem; }
.tag { border-radius: .28rem; background: #f3f5ef; color: #535e48; font-size: .75rem; padding: .23rem .41rem; line-height: 1.18; }
.card-footer { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 2.75rem; margin-top: .85rem; border-top: 1px solid #edf0e8; }
.card-metric { min-width: 0; display: inline-flex; gap: .32rem; align-items: center; color: #566149; font-size: .76rem; font-weight: 630; }
.card-metric svg { width: .87rem; height: .87rem; }
.metric-stars svg { color: #7c6617; }
.metric-installs svg { color: #516b18; }
.details-button { display: inline-flex; align-items: center; gap: .3rem; margin-right: -.15rem; padding: .36rem .17rem; border: 0; border-radius: .25rem; color: #536044; background: transparent; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.details-button:hover { color: #3c5404; text-decoration: underline; text-underline-offset: .2em; }
.details-button svg { width: .85rem; height: .85rem; }
.more-wrap { display: grid; place-items: center; margin-top: 1.65rem; }
.empty-state { display: grid; justify-items: center; padding: 3rem 1rem; border: 1px dashed #cfd8bf; border-radius: .85rem; text-align: center; color: var(--muted); }
.empty-state .resource-icon { margin-bottom: .75rem; }
.empty-state h3 { margin: 0 0 .35rem; color: var(--ink); font-size: 1.2rem; }
.empty-state p { margin: 0 0 1rem; }
.empty-state a { text-decoration: underline; }

.secondary-button, .primary-button { display: inline-flex; align-items: center; justify-content: center; gap: .42rem; border: 1px solid #d7dfca; border-radius: .5rem; padding: .62rem .86rem; background: #fff; color: #364329; min-height: 2.6rem; font-size: .87rem; font-weight: 700; }
.secondary-button:hover { background: #eef3e5; border-color: #aebf93; }
.primary-button { border-color: #d0ed51; background: var(--lime); color: #222b0d; }
.primary-button:hover { background: #e1fb79; border-color: #a6c340; }

.site-footer { border-top: 1px solid var(--line); background: #f0f3e8; }
.footer-inner { min-height: 5rem; display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1.35rem; padding-block: .85rem; }
.footer-inner .wordmark { font-size: 1.03rem; }
.footer-inner .wordmark-accent { color: #4d6316; }
.footer-inner p { margin: 0; color: var(--muted); font-size: .84rem; }
.footer-inner > .footer-about { margin-left: auto; }

.detail-frame { max-width: 59rem; min-height: calc(100dvh - 10rem); padding-block: 2.1rem 4rem; }
.breadcrumbs { margin-bottom: 1.25rem; color: #536044; font-size: .875rem; }
.breadcrumbs ol { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li + li::before { content: '/'; color: #899079; margin-right: .5rem; }
.breadcrumbs a { text-decoration: underline; text-underline-offset: .19em; }
.detail-article { background: #fff; border: 1px solid #dde4d3; border-radius: 1rem; overflow: hidden; }
.detail-heading { padding: clamp(1.25rem, 4vw, 3.25rem); background: linear-gradient(124deg, #f0f4e7, #fafbf6 66%); border-bottom: 1px solid #e4e8dc; }
.detail-context { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.detail-heading h1 { max-width: 45rem; margin: .92rem 0 .6rem; font-size: clamp(2rem, 5.6vw, 3.75rem); line-height: 1.08; letter-spacing: -.06em; overflow-wrap: anywhere; }
html:lang(zh) .detail-heading h1, html:lang(ja) .detail-heading h1 { letter-spacing: -.035em; line-height: 1.24; }
.detail-summary { max-width: 66ch; margin: 0 0 1rem; color: #4d5743; font-size: 1.08rem; line-height: 1.65; }
.detail-content { display: grid; gap: 1.5rem; padding: clamp(1.25rem, 4vw, 3.25rem); }
.detail-content h2, .related h2 { margin: 0 0 .48rem; font-size: 1.28rem; letter-spacing: -.023em; }
.detail-content p { margin: 0; max-width: 72ch; color: #4b5641; font-size: 1rem; line-height: 1.7; }
.detail-content .byline { color: var(--muted); font-size: .88rem; }
.detail-content > .secondary-button { justify-self: start; }
.resource-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1.2rem; margin: 0; padding: 1.15rem; background: #f5f7ef; border: 1px solid #e5eadd; border-radius: .65rem; }
.resource-facts dt { color: #59644e; font-size: .83rem; font-weight: 650; }
.resource-facts dd { margin: .22rem 0 0; overflow-wrap: anywhere; }
.resource-facts a { color: #435d02; text-decoration: underline; text-underline-offset: .2em; }
.prompt-text { margin: .55rem 0 0; padding: 1rem; color: #343f2b; background: #f0f3e9; border: 1px solid #e0e6d9; border-radius: .55rem; font: inherit; font-size: .97rem; line-height: 1.72; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.detail-actions [aria-pressed="true"] svg { fill: #cce482; }
.related { margin-top: 2rem; }
.related ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: .9rem 0 .65rem; padding: 0; list-style: none; }
.related li { display: flex; }
.related li a { display: flex; flex: 1; flex-direction: column; gap: .35rem; justify-content: space-between; padding: .9rem; background: #fff; border: 1px solid #e0e5d7; border-radius: .6rem; font-weight: 680; overflow-wrap: anywhere; }
.related li a:hover { border-color: #a8bd80; color: #40560a; }
.related small { color: var(--muted); font-size: .79rem; font-weight: 500; }
.toast { position: fixed; z-index: 10; right: 1rem; bottom: 1rem; padding: .65rem .86rem; max-width: calc(100% - 2rem); border-radius: .55rem; background: #263213; color: #f6f9ed; opacity: 0; transform: translateY(.4rem); pointer-events: none; font-size: .89rem; transition: opacity .18s ease, transform .18s ease; }
.toast.visible { opacity: 1; transform: none; }

@media (max-width: 68rem) {
  .frame { width: min(100% - 4rem, 77rem); }
  .directory-layout { grid-template-columns: 12.15rem minmax(0, 1fr); gap: 1.15rem; }
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-art { right: -12%; width: 81%; }
}
@media (max-width: 50rem) {
  .frame { width: calc(100% - 2.5rem); }
  .hero-art { right: -18%; width: 92%; opacity: .73; }
  .hero-inner { min-height: 26rem; }
  .hero-content { padding-block: 2.75rem; }
  .directory { padding-block: 2.35rem 3.5rem; }
  .directory-layout { grid-template-columns: minmax(0, 1fr); gap: .85rem; padding-top: .9rem; }
  .category-panel h3, .category-note { display: none; }
  .categories { display: flex; overflow-x: auto; gap: .38rem; padding: .23rem .23rem .45rem; margin-inline: -.23rem; scrollbar-width: thin; }
  .category-button { width: auto; grid-template-columns: 1.1rem max-content auto; min-height: 2.42rem; border-color: var(--line); background: #fff; white-space: nowrap; }
}
@media (max-width: 36rem) {
  .frame { width: calc(100% - 2rem); }
  .header-inner { grid-template-columns: 1fr auto; min-height: 3.7rem; }
  .header-inner .wordmark, .header-actions { margin-block: .65rem .4rem; }
  .wordmark { font-size: 1.03rem; gap: .38rem; }
  .wordmark img { width: 1.62rem; height: 1.62rem; }
  .primary-nav { grid-row: 2; grid-column: 1 / -1; gap: 1.15rem; min-height: 2.25rem; }
  .primary-nav a { padding: .1rem .22rem .35rem; font-size: .84rem; }
  .primary-nav a[aria-current]::after { inset-inline: .22rem; }
  .saved-nav { position: relative; padding: .42rem; min-width: 2.2rem; min-height: 2.2rem; justify-content: center; }
  .saved-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .saved-number { position: absolute; right: -.39rem; top: -.38rem; }
  .hero-art { top: 43%; right: -54%; width: 142%; height: 110%; opacity: .55; mask-image: radial-gradient(ellipse 59% 58% at 50% 50%, #000 38%, transparent 100%); }
  .hero-inner { min-height: 0; }
  .hero-content { width: 100%; padding-block: 2.35rem 2.45rem; }
  .hero h1 { font-size: clamp(2.55rem, 10.4vw, 3.5rem); }
  html:lang(fr) .hero h1, html:lang(ja) .hero h1 { font-size: clamp(2.15rem, 8.6vw, 3.3rem); }
  .hero p { margin: 1rem 0 1.3rem; font-size: .92rem; }
  .eyebrow { margin-bottom: .9rem; }
  .search-form { gap: .42rem; }
  .search-form input { font-size: 1rem; }
  .search-submit { padding-inline: .67rem; }
  .directory-heading { padding-bottom: 1.05rem; }
  .directory-heading .text-button { white-space: normal; text-align: end; }
  .sort-control { max-width: 46%; }
  .resource-grid { grid-template-columns: minmax(0, 1fr); gap: .72rem; }
  .card-description { min-height: 0; }
  .detail-frame { padding-block: 1.25rem 2.7rem; }
  .related ul { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 21.5rem) {
  .frame { width: calc(100% - 1.4rem); }
  .header-inner { gap: .2rem; }
  .wordmark { font-size: .92rem; }
  .primary-nav a { padding-inline: .24rem; }
  .search-icon { margin-inline-start: .25rem; }
  .resource-facts { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
