:root {
  color-scheme: light;
  --ink: #17221f;
  --muted: #62716c;
  --faint: #88938e;
  --line: #dce4df;
  --paper: #f1f5f3;
  --white: #fff;
  --teal: #087e83;
  --blue: #2468bb;
  --coral: #d65f4b;
  --lime: #d6e955;
  --gold: #d39a25;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Iowan Old Style", "Songti SC", "Noto Serif SC", Georgia, serif;
  --font-data: "SF Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: var(--font-body); font-size: 14px; line-height: 1.55; }
a { color: inherit; }
button, input, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.topbar { height: 54px; padding: 0 clamp(18px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #f8faf9; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 720; text-decoration: none; }
.brand-mark { width: 23px; height: 23px; display: grid; place-items: center; color: var(--teal); font-size: 25px; line-height: 1; }
.topbar-links { display: flex; align-items: center; gap: 19px; color: var(--muted); font-size: 12px; }
.topbar-links a { text-decoration: none; }
.topbar-links a:hover, .page-footer a:hover { color: var(--teal); }
.topbar-links span { color: var(--coral); }

main { max-width: 1440px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 64px) 42px; }
.hero { min-height: 310px; position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-start; margin: 18px 0 32px; background: #dfe8e4; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(8 27 27 / 76%) 0%, rgb(8 27 27 / 39%) 38%, transparent 74%); }
.hero img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 48%; }
.hero-copy { width: min(590px, 66%); padding: 49px clamp(22px, 4vw, 54px) 34px; color: #fff; }
.eyebrow { margin: 0; color: inherit; font-size: 11px; font-weight: 680; }
.hero-copy .eyebrow { display: flex; align-items: center; gap: 8px; color: #d5e7dc; }
.hero-copy .eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.hero h1 { margin: 18px 0 8px; font-family: var(--font-display); font-size: 42px; font-weight: 650; line-height: 1.16; }
.hero-deck { max-width: 470px; margin: 0; color: #e5ece8; font-size: 14px; line-height: 1.75; }
.hero-meta { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: #e5ece8; font-size: 11px; }
.hero-meta strong { color: var(--lime); font: 22px var(--font-data); }
.hero-meta i { width: 1px; height: 13px; margin: 0 5px; background: rgb(255 255 255 / 48%); }

.catalog { padding-top: 2px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 19px; }
.section-heading .eyebrow { color: var(--teal); text-transform: uppercase; }
.section-heading h2 { margin: 3px 0 0; font-family: var(--font-display); font-size: 25px; font-weight: 650; line-height: 1.3; }
.source-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); background: var(--white); color: var(--muted); text-decoration: none; font-size: 11px; }
.source-pill span { color: var(--coral); }
.category-nav { display: flex; gap: 7px; padding: 0 0 12px; overflow-x: auto; scrollbar-width: thin; }
.category-tab { flex: none; min-height: 33px; padding: 6px 10px; border: 1px solid var(--line); background: var(--white); color: var(--muted); cursor: pointer; font-size: 11px; white-space: nowrap; transition: background 120ms ease, border-color 120ms ease, color 120ms ease; }
.category-tab:hover { border-color: #9ebcb3; color: var(--ink); }
.category-tab.is-active { border-color: var(--ink); background: var(--ink); color: white; }
.category-count { margin-left: 7px; color: var(--faint); font: 10px var(--font-data); }
.category-tab.is-active .category-count { color: var(--lime); }
.control-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.search-box { width: min(480px, 100%); min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 11px; border: 1px solid #cfdad4; background: #fff; }
.search-icon { width: 14px; height: 14px; flex: none; position: relative; border: 1.6px solid #71807a; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 1.6px; right: -5px; bottom: -2px; transform: rotate(45deg); background: #71807a; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-box input::placeholder { color: #9aa49f; }
kbd { padding: 1px 5px; border: 1px solid var(--line); color: var(--faint); background: #f7f9f8; font: 10px var(--font-data); }
.sort-control { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.sort-control select { min-height: 34px; padding: 0 25px 0 9px; border: 1px solid var(--line); background: white; color: var(--ink); font-size: 11px; }
.result-bar { display: flex; align-items: center; justify-content: space-between; min-height: 39px; color: var(--muted); font-size: 11px; }
.result-bar p { margin: 0; }
.result-bar button { padding: 3px 0; border: 0; background: none; color: var(--teal); cursor: pointer; font-size: 11px; }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.resource-card { min-height: 235px; padding: 14px 15px 11px; display: flex; flex-direction: column; border: 1px solid var(--line); background: white; transition: border-color 130ms ease, transform 130ms ease; }
.resource-card:hover { border-color: #aabdb5; transform: translateY(-1px); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.category-label { color: var(--teal); font-size: 10px; font-weight: 650; }
.source-index { color: #929c97; font: 9px var(--font-data); white-space: nowrap; }
.resource-title { margin: 10px 0 0; overflow-wrap: anywhere; font-family: var(--font-display); font-size: 17px; font-weight: 650; line-height: 1.35; }
.resource-host { margin: 2px 0 8px; color: #8b9791; overflow-wrap: anywhere; font: 10px var(--font-data); }
.resource-description { margin: 0 0 8px; color: #45534d; font-size: 12px; line-height: 1.62; }
.resource-note { margin: 0 0 8px; padding-left: 8px; border-left: 2px solid var(--gold); color: #76633e; font-size: 10px; line-height: 1.5; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding: 7px 0 9px; }
.tag { padding: 3px 6px; border-radius: 3px; background: #edf2ef; color: #586660; font-size: 9px; line-height: 1.35; }
.language-tag { background: #eaf1fa; color: #426488; }
.status-tag { background: #fcf3dc; color: #7a622e; }
.card-footer { min-height: 29px; display: flex; align-items: center; border-top: 1px solid #edf0ee; }
.open-link { color: var(--blue); font-size: 11px; font-weight: 650; text-decoration: none; }
.open-link:hover { color: #174f95; }
.empty-state { padding: 40px 0; text-align: center; }
.empty-state h3 { margin: 0; font-family: var(--font-display); font-size: 20px; }
.empty-state p { margin: 6px 0; color: var(--muted); font-size: 12px; }
.editorial-note { display: flex; gap: 12px; margin-top: 23px; padding: 15px 16px; border-top: 1px solid #d9dfdc; border-bottom: 1px solid #d9dfdc; color: var(--muted); }
.note-mark { width: 20px; height: 20px; flex: none; display: grid; place-items: center; background: var(--lime); color: var(--ink); font: 700 12px var(--font-data); }
.editorial-note strong { display: block; margin: 0 0 3px; color: var(--ink); font-size: 12px; }
.editorial-note p { max-width: 1060px; margin: 0; font-size: 11px; line-height: 1.7; }
.page-footer { min-height: 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; color: var(--faint); font-size: 10px; }
.source-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.page-footer a { flex: none; color: var(--muted); text-decoration: none; }
.noscript { margin: 16px; padding: 10px; background: white; }

@media (max-width: 1000px) {
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { min-height: 290px; }
}
@media (max-width: 650px) {
  .topbar { height: 50px; padding-inline: 16px; }
  .topbar-links { gap: 12px; font-size: 10px; }
  main { padding: 0 14px 25px; }
  .hero { min-height: 288px; margin: 10px 0 24px; align-items: end; }
  .hero img { object-position: 39% center; }
  .hero::after { background: linear-gradient(0deg, rgb(8 27 27 / 81%) 0%, rgb(8 27 27 / 39%) 64%, rgb(8 27 27 / 8%) 100%); }
  .hero-copy { width: 100%; padding: 65px 19px 20px; }
  .hero h1 { margin-top: 12px; font-size: 34px; }
  .hero-deck { max-width: 390px; font-size: 12px; }
  .section-heading { align-items: center; margin-bottom: 13px; }
  .section-heading h2 { font-size: 21px; }
  .source-pill { padding: 6px 8px; font-size: 10px; }
  .category-nav { margin-inline: -2px; }
  .control-row { align-items: stretch; }
  .search-box { flex: 1; }
  .sort-control { gap: 5px; }
  .sort-control > span { display: none; }
  .sort-control select { max-width: 112px; }
  .resource-grid { grid-template-columns: 1fr; gap: 8px; }
  .resource-card { min-height: 0; padding: 13px; }
  .resource-description { margin-bottom: 4px; }
  .card-tags { padding-bottom: 8px; }
  .page-footer { align-items: flex-start; padding-top: 13px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
