/* ============================================================
   Awesome AI Scientist
   Noto Sans throughout, dark text, one vivid hue per category,
   and brand-coloured action buttons on every entry.
   ============================================================ */

:root {
  color-scheme: light;

  --bg:        #FFFFFF;
  --surface:   #F4F7FA;
  --raised:    #FFFFFF;
  --text:      #0F172A;
  --text-2:    #334155;   /* body copy: dark, not grey */
  --text-3:    #64748B;   /* only for the faintest labels */
  --border:    #DFE5EC;
  --border-2:  #B9C4D2;

  --teal:      #12B5A5;
  --orange:    #F5892B;
  --gold:      #F5A623;
  --arxiv:     #B31B1B;
  --github:    #24292F;
  --site:      #2EA44F;
  --hf:        #FFB800;
  --c:         var(--teal);

  --sans: 'Noto Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --shell: 1180px;
  --r:     6px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:       #0E1116;
  --surface:  #171E27;
  --raised:   #19212B;
  --text:     #F1F5F9;
  --text-2:   #CBD5E1;
  --text-3:   #8B98A9;
  --border:   #2A3440;
  --border-2: #445262;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:       #0E1116;
    --surface:  #171E27;
    --raised:   #19212B;
    --text:     #F1F5F9;
    --text-2:   #CBD5E1;
    --text-3:   #8B98A9;
    --border:   #2A3440;
    --border-2: #445262;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16.5px; line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.015em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; border-radius: 4px; }
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 28px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg);
       border-bottom: 1px solid var(--border); }
.nav-in { max-width: var(--shell); margin: 0 auto; padding: 0 28px; height: 70px;
          display: flex; align-items: center; gap: 30px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap;
         font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.brand svg { flex: none; }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.nav-links a {
  font-size: 15px; font-weight: 600; color: var(--text-2);
  padding: 8px 12px; border-radius: 6px; white-space: nowrap;
  transition: color .12s, background .12s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a[aria-current] { color: var(--text); font-weight: 700; }
.nav-links a[aria-current]::after {
  content: ""; display: block; height: 3px; margin: 5px -3px -10px;
  background: var(--c); border-radius: 3px;
}
.nav-end { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; min-width: 36px; padding: 0 9px; cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  color: var(--text-2); transition: color .12s, background .12s, border-color .12s;
}
.icon-btn:hover { color: var(--text); background: var(--surface); border-color: var(--border); }

/* ---------- hero ---------- */
.hero { padding: 84px 0 46px; text-align: center; }
.hero h1 { font-size: clamp(37px, 5.4vw, 60px); font-weight: 800; line-height: 1.04;
           letter-spacing: -.03em; }
.hero .lede { margin: 20px auto 0; max-width: none; font-size: clamp(18px, 1.9vw, 22px);
              font-weight: 500; color: var(--text-2); }
.hero .cta { display: flex; justify-content: center; gap: 14px; margin-top: 38px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-size: 16.5px; font-weight: 700; line-height: 1;
  padding: 15px 27px; border-radius: 7px; border: 2px solid var(--border);
  background: var(--raised); color: var(--text); cursor: pointer;
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--border-2); }
.btn.solid {
  background: var(--c); border-color: var(--c); color: #fff;
  box-shadow: 0 5px 16px color-mix(in srgb, var(--c) 42%, transparent);
}
.btn.solid:hover { box-shadow: 0 8px 22px color-mix(in srgb, var(--c) 50%, transparent); }

/* Linked badges in the README's own colours: label half solid, value half darker. */
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 40px 0 0; }
.badge {
  display: inline-flex; align-items: stretch; border-radius: 8px; overflow: hidden;
  font-size: 15px; font-weight: 600; line-height: 1;
  transition: transform .12s, box-shadow .12s;
}
.badge:hover { transform: translateY(-2px);
               box-shadow: 0 4px 12px color-mix(in srgb, var(--bc) 40%, transparent); }
.badge .k {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 15px;
  background: var(--bc); color: #fff;
}
.badge .v {
  display: inline-flex; align-items: center; padding: 11px 15px;
  background: color-mix(in srgb, var(--bc) 84%, #000); color: #fff;
  font-variant-numeric: tabular-nums;
}
.badge svg { flex: none; opacity: .95; }
/* The same lightness as the reference site's buttons, sampled from it. */
.b-paper { --bc: #EF4444; }
.b-code  { --bc: #6B7280; }
.b-hf    { --bc: #F59E0B; }
.b-bench { --bc: #3B82F6; }
.b-data  { --bc: #10B981; }
.b-star  { --bc: #8B5CF6; }

/* ---------- the map: headings, a line of context, then the modules ---------- */
.map { display: flex; flex-direction: column; gap: 52px; padding: 8px 0 64px; }
.mapcat-head { display: inline-flex; align-items: center; gap: 12px; }
.mapcat-name { font-size: 26px; font-weight: 700; letter-spacing: -.025em; }
.mapcat-n {
  font-size: 14px; font-weight: 700; color: #fff; background: var(--c);
  padding: 4px 10px; border-radius: 5px;
}
.mapcat-go { color: var(--c); font-size: 19px; font-weight: 700; transition: transform .14s; }
.mapcat-head:hover .mapcat-name { color: var(--c); }
.mapcat-head:hover .mapcat-go { transform: translateX(4px); }
.mapcat-note { margin: 10px 0 16px; font-size: 15.5px; color: var(--text-2); }
.mapcat-subs { display: flex; flex-wrap: wrap; gap: 10px; }
.mapcat-subs a {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 16px;
  border-radius: 7px; background: var(--surface);
  font-size: 15px; font-weight: 600; color: var(--text-2);
  transition: color .12s, background .12s;
}
.mapcat-subs a:hover { color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.mapcat-subs b { font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.mapcat-subs a:hover b { color: var(--c); }

/* ---------- page head ---------- */
.page-head { padding: 56px 0 0; }
.page-head h1 { display: flex; align-items: center; gap: 14px;
                font-size: clamp(27px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.03em; }
.cat-ico-page {
  flex: none; display: block;
}
.crumb { font-size: 13.5px; font-weight: 600; color: var(--text-3); margin-bottom: 14px; }
.crumb a:hover { color: var(--c); }

.subtabs { display: flex; gap: 4px; margin-top: 34px; overflow-x: auto; scrollbar-width: none;
           border-bottom: 2px solid var(--border); }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: 15px; font-weight: 600; color: var(--text-2);
  padding: 11px 14px; border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: color .12s, border-color .12s;
}
.subtabs a:hover { color: var(--text); }
.subtabs a[aria-current] { color: var(--c); font-weight: 700; border-bottom-color: var(--c); }
.subtabs .n { font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.subtabs a[aria-current] .n { color: var(--c); }

/* ---------- toolbar ---------- */
.tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 30px 0 24px; }
.field { position: relative; flex: 1 1 300px; min-width: 220px; display: flex; align-items: center; }
.field svg { position: absolute; left: 15px; color: var(--text-3); pointer-events: none; }
.field input {
  width: 100%; font-family: var(--sans); font-size: 15.5px; font-weight: 500; color: var(--text);
  background: var(--raised); border: 2px solid var(--border); border-radius: 7px;
  padding: 11px 14px 11px 40px;
}
.field input::placeholder { color: var(--text-3); font-weight: 400; }
.field input:focus { border-color: var(--c); outline: none; }
select.pick-sel {
  font-family: var(--sans); font-size: 14.5px; font-weight: 600; color: var(--text-2);
  background: var(--raised); border: 2px solid var(--border); border-radius: 7px;
  padding: 11px 13px; cursor: pointer; transition: color .12s, border-color .12s;
}
select.pick-sel:hover { border-color: var(--border-2); color: var(--text); }
.result { font-size: 14px; font-weight: 700; color: var(--text-3);
          margin-left: auto; white-space: nowrap; }

/* ---------- listing groups ---------- */
.group { margin-top: 50px; }
.group:first-of-type { margin-top: 0; }
.group h2 {
  font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 18px;
  padding-bottom: 12px; border-bottom: 2px solid var(--border);
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.group h2::before {
  content: ""; position: absolute; width: 32px; height: 3px; margin-top: 31px;
  background: var(--c); border-radius: 3px;
}
.group h2 .n { font-size: 14px; font-weight: 700; color: var(--text-3); }
.empty { display: none; padding: 70px 0; text-align: center; color: var(--text-2);
         font-size: 17px; font-weight: 600; }
.is-hidden { display: none !important; }

/* ---------- entry cards ---------- */
.grid {
  display: grid; gap: 20px; align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
}
.card {
  position: relative; display: flex; flex-direction: column; gap: 11px; padding: 18px 20px;
  background: var(--raised); border: 2px solid var(--border); border-radius: 8px;
  transition: border-color .14s, transform .14s, box-shadow .14s;
}
.card:hover {
  border-color: var(--c); transform: translateY(-2px);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--c) 18%, transparent);
}
/* a long venue name drops to its own line instead of pushing the card wider */
.card-top { display: flex; align-items: flex-start; gap: 10px 14px; flex-wrap: wrap; }
.ava { flex: none; width: 32px; height: 32px; border-radius: 6px; object-fit: cover;
       background: var(--surface); border: 1px solid var(--border); }
.ava-none { display: inline-flex; align-items: center; justify-content: center;
            font-size: 16px; font-weight: 700; color: var(--text-3); }
.card-title {
  flex: 1 1 55%; min-width: 0; font-size: 17.5px; font-weight: 700; line-height: 1.32;
  overflow-wrap: anywhere;
  letter-spacing: -.02em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.card:hover .card-title { color: var(--c); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 1 auto; margin-left: auto;
        max-width: 100%; }
.tag {
  font-size: 12.5px; font-weight: 700; line-height: 1; padding: 6px 10px;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--border);
  border-radius: 5px; white-space: nowrap;
}
.card-desc {
  font-size: 15px; font-weight: 400; color: var(--text-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; align-items: center; justify-content: space-between;
             gap: 14px; flex-wrap: wrap; padding-top: 4px; }
.acts { display: flex; flex-wrap: wrap; gap: 7px; }

/* the action buttons use the same colours the README badges do */
.act {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  font-size: 13px; font-weight: 700; color: #fff; border-radius: 6px;
  transition: transform .12s, filter .12s;
}
.act:hover { transform: translateY(-2px); filter: brightness(1.1); }
.act svg { flex: none; }
.act.paper { background: var(--arxiv); }
.act.code  { background: var(--github); }
.act.site  { background: var(--site); }
.act.data  { background: var(--hf); color: #3B2B00; }
:root[data-theme="dark"] .act.code { background: #3B444E; }

.stars { display: inline-flex; align-items: center; gap: 6px;
         font-size: 14.5px; font-weight: 700; color: var(--text-2); }
.stars .s { color: var(--gold); font-size: 16px; line-height: 1; }

/* ---------- prose (about) ---------- */
.prose { max-width: 100%; padding-top: 10px; }
.prose h2 { font-size: 22px; font-weight: 700; margin: 36px 0 13px; }
.prose p { margin: 0 0 14px; color: var(--text-2); }
.prose li { margin: 0 0 9px 20px; color: var(--text-2); list-style: disc; }
.prose a { color: var(--c); font-weight: 600; border-bottom: 2px solid
           color-mix(in srgb, var(--c) 35%, transparent); }
.prose a:hover { border-color: var(--c); }
pre.cite {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.7; color: var(--text-2);
  background: var(--surface); border: 2px solid var(--border); border-radius: 8px;
  padding: 20px; overflow-x: auto; margin: 0 0 16px;
}

/* ---------- footer ---------- */
.foot { border-top: 2px solid var(--border); margin-top: 96px; padding: 36px 0 56px; }
.foot-row { display: flex; align-items: center; gap: 22px 30px; flex-wrap: wrap; }
.foot-links { display: flex; flex-wrap: wrap; gap: 5px 7px; margin-left: auto; }
.foot-links a { font-size: 15px; font-weight: 600; color: var(--text-2);
                padding: 7px 12px; border-radius: 6px; transition: color .12s, background .12s; }
.foot-links a:hover { color: var(--text); background: var(--surface); }
.colophon { margin-top: 22px; font-size: 14px; font-weight: 500; color: var(--text-3); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .map { grid-template-columns: minmax(0, 1fr); }
  .nav-in { height: auto; padding-top: 12px; padding-bottom: 10px; flex-wrap: wrap; gap: 12px; }
  .nav-end { margin-left: auto; }
  .nav-links { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a[aria-current]::after { margin-bottom: -7px; }
  html { scroll-padding-top: 130px; }
}
@media (max-width: 640px) {
  .shell, .nav-in { padding-left: 18px; padding-right: 18px; }
  body { font-size: 15.5px; }
  .hero { padding-top: 52px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .result { margin-left: 0; flex-basis: 100%; }
  .foot-links { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* published emoji artwork, sized in place */
.cat-ico { flex: none; display: block; }
.page-head h1 .cat-ico { margin-top: 2px; }
