@font-face { font-family: "Departure Mono"; src: url(fonts/DepartureMono-Regular.otf) format("opentype"); font-display: swap; }
@font-face { font-family: "Press Start 2P"; src: url(fonts/PressStart2P-Regular.ttf) format("truetype"); font-display: swap; }
:root {
  color-scheme: light;
  --ink: #1e1e1e; --paper: #fefefe; --card: #fefefe; --edge: #1e1e1e; --shade: #1e1e1e;
  --bar: #1e1e1e; --on-bar: #fefefe;
  --accent: #ff5c1a; --accent2: #ffa66b; --second: #ffe2d1; --on-accent: #1e1e1e; --hot: #ff5c1a;
  --bar0: #ff5c1a; --bar1: #ffcd75; --bar2: #41a6f6; --bar3: #7fdcb5;
  --dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Crect x='8' y='8' width='2' height='2' fill='%23dcdcdc'/%3E%3C/svg%3E");
  --dots-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Crect x='8' y='8' width='2' height='2' fill='%23444444'/%3E%3C/svg%3E");
  --mono: "Departure Mono", ui-monospace, Menlo, Consolas, monospace;
  --arc: "Press Start 2P", "Departure Mono", monospace;
  --gut: 16px; --max: 1600px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f2f2f2; --paper: #262626; --card: #1a1a1a; --edge: #f2f2f2; --shade: #000;
  --bar: #0e0e0e; --accent: #ff7a3d; --accent2: #ff5c1a; --second: #5a2c18;
  --dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Crect x='8' y='8' width='2' height='2' fill='%23404040'/%3E%3C/svg%3E");
}
@media (min-width: 900px) { :root { --gut: 32px; } }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper) var(--dots); color: var(--ink); font: 400 17px/1.5 var(--mono); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
p { margin: 0; }
h1, h2 { margin: 0; font-weight: 400; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
.px { display: block; shape-rendering: crispEdges; flex: none; }
.px .m { fill: var(--accent); }
.px .o { fill: var(--accent2); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

.top { position: fixed; inset: 0 0 auto 0; z-index: 60; height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 var(--gut); background: var(--bar); color: var(--on-bar); border-bottom: 3px solid var(--hot); }
.top .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 14px/1 var(--arc); color: var(--on-bar); text-shadow: 2px 2px 0 var(--hot); padding: 6px 4px; white-space: nowrap; }
.top .brand .px { width: 32px; height: 26px; }
.top .brand .px .m { fill: #ff5c1a; }
.top .brand .px .o { fill: #ffa66b; }
.top nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.top nav a, .top nav button { display: block; background: none; border: 0; color: var(--on-bar); text-decoration: none; font: 400 17px/1 var(--mono); padding: 8px 9px 7px; cursor: pointer; white-space: nowrap; }
.top nav a:hover, .top nav button:hover { background: var(--hot); color: #1e1e1e; }
.top nav a.hot { background: var(--hot); color: #1e1e1e; box-shadow: 2px 2px 0 var(--on-bar); margin-left: 6px; }
.top nav a.hot:hover { background: #ffa66b; }

.banner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 44px; align-items: center; padding-top: 104px; padding-bottom: 40px; }
.banner .logo .px { width: 208px; height: 169px; }
.banner .tag { display: inline-block; background: var(--accent); color: #fefefe; font: 400 clamp(17px, 1.7vw, 22px)/1 var(--mono); padding: 6px 12px 5px; margin-bottom: 18px; }
.banner h1 { font: 400 clamp(30px, 6vw, 84px)/1.1 var(--arc); text-shadow: .08em .08em 0 var(--accent); }
.banner .sub { font: 400 clamp(18px, 2vw, 26px)/1.35 var(--mono); margin-top: 22px; max-width: 52ch; min-height: 2.7em; }
.banner .meta { font: 400 clamp(16px, 1.4vw, 19px)/1.55 var(--mono); margin-top: 12px; max-width: 84ch; }
.banner .meta b { font-weight: 400; background: var(--bar); color: var(--on-bar); padding: 0 6px; }
.cursor { display: inline-block; width: .55em; height: .9em; background: var(--accent); vertical-align: -.08em; margin-left: 4px; }
.logo rect[style] { animation: px-in 1ms steps(1) both; animation-delay: calc(var(--d) * 22ms); }
@keyframes px-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .logo rect[style] { animation: none; } }

.controls { display: grid; gap: 14px; padding-bottom: 26px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; border: 2px solid var(--edge); background: var(--card); color: var(--ink); font: 400 16px/1 var(--mono); padding: 7px 7px 6px; cursor: pointer; box-shadow: 2px 2px 0 var(--shade); }
.tabs button i { width: 10px; height: 10px; background: var(--sc); box-shadow: 0 0 0 2px var(--edge); flex: none; }
.tabs button b { font-weight: 400; color: var(--accent); }
.tabs button:hover { background: var(--second); }
.tabs button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.tabs button[aria-pressed="true"] b { color: var(--on-accent); }
.tabs button:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--shade); }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.tools .grp { display: inline-flex; align-items: center; gap: 8px; }
.tools .grp > span { white-space: nowrap; }
.tools .tabs button { padding: 5px 8px 4px; font-size: 16px; }
.search { display: flex; align-items: center; border: 2px solid var(--edge); background: var(--card); box-shadow: 2px 2px 0 var(--shade); }
.search span { background: var(--bar); color: var(--on-bar); padding: 7px 9px 6px; line-height: 1; }
.search input { width: 250px; border: 0; background: transparent; padding: 6px 10px 5px; outline: 0; font-size: 17px; line-height: 1; }
.search input::placeholder { color: var(--ink); opacity: .55; }
.search:focus-within { box-shadow: 2px 2px 0 var(--accent); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
.cols button { width: 30px; height: 30px; border: 2px solid var(--edge); background: var(--card); color: var(--ink); cursor: pointer; font: 400 17px/1 var(--mono); padding: 0; box-shadow: 2px 2px 0 var(--shade); }
.cols button:hover { background: var(--second); }
.cols button:active { transform: translate(2px, 2px); box-shadow: none; }
.cols b { font-weight: 400; min-width: 22px; text-align: center; }
.count { margin-left: auto; background: var(--bar); color: var(--on-bar); padding: 5px 8px 4px; line-height: 1; white-space: nowrap; }

main.wrap { padding-bottom: 80px; }
#grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 24px 22px; }
.sh { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 8px; align-items: center; padding: 18px 0 2px; }
.sh:first-child { padding-top: 0; }
.sh i { width: 16px; height: 16px; background: var(--sc); box-shadow: 0 0 0 2px var(--edge); }
.sh h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font: 400 clamp(15px, 1.5vw, 20px)/1.3 var(--arc); }
.sh h2 small { font: 400 16px/1 var(--mono); background: var(--bar); color: var(--on-bar); padding: 4px 7px 3px; }
.sh h2 em { font: 400 20px/1 var(--mono); color: var(--accent); }
.sh p { grid-column: 2; max-width: 90ch; }

.card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; min-width: 0; background: var(--card); color: var(--ink); border: 2px solid var(--edge); box-shadow: 4px 4px 0 var(--shade); transition: transform .08s steps(2), box-shadow .08s steps(2); }
.card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shade); }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }
.win-t { display: flex; align-items: flex-start; gap: 10px; background: var(--bar0); color: #1e1e1e; font: 400 17px/1.25 var(--mono); padding: 7px 9px 6px; border-bottom: 2px solid var(--edge); text-decoration: none; }
.win-t::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: .3em; background: var(--sc, #fefefe); box-shadow: 0 0 0 2px #1e1e1e; }
.win-t .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.win-t .n { flex: none; white-space: nowrap; }
.card.b1 .win-t { background: var(--bar1); }
.card.b2 .win-t { background: var(--bar2); }
.card.b3 .win-t { background: var(--bar3); }
.card:hover .win-t { background: #1e1e1e; color: #fefefe; }
.pg { position: relative; display: flex; flex-direction: column; gap: 10px; margin: 10px 10px 0; padding: 12px 30px 14px 14px; border: 2px solid var(--edge); background: var(--paper); text-decoration: none; }
.pg:hover { background: var(--second); }
.pg:focus-visible, .win-t:focus-visible, .chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pg .ear { position: absolute; top: -2px; right: -2px; width: 18px; height: 18px; }
.pg .ear .c { fill: var(--card); }
.pg .ear .e { fill: var(--edge); }
.pg .ear .f { fill: var(--accent2); }
.pg .ti { font-size: 18px; line-height: 1.35; }
.pg .au { font-size: 16px; line-height: 1.35; margin-top: auto; }
.pg .au b { font-weight: 400; color: var(--accent); }
:root[data-theme="dark"] .pg .au b { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 7px; margin: 0 10px; padding: 12px 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 2px solid var(--edge); background: var(--card); color: var(--ink); font: 400 15px/1 var(--mono); padding: 4px 5px 3px; text-decoration: none; cursor: pointer; box-shadow: 2px 2px 0 var(--shade); white-space: nowrap; }
.chip:hover { background: var(--second); }
.chip:active { transform: translate(2px, 2px); box-shadow: none; }
.chip.go { background: var(--bar); color: var(--on-bar); }
.chip.go:hover { background: var(--accent); color: #1e1e1e; }
.chip svg:not(.px) { width: 14px; height: 14px; flex: none; }
.empty { text-align: center; padding: 60px 0; font-size: 18px; }

dialog { width: min(820px, calc(100vw - 2 * var(--gut))); max-height: calc(100vh - 80px); padding: 0; border: 2px solid var(--edge); background: var(--card); color: var(--ink); box-shadow: 8px 8px 0 var(--accent); overflow: auto; }
dialog::backdrop { background: rgba(30, 30, 30, .55) var(--dots-ink); }
dialog .win-t { position: sticky; top: 0; z-index: 1; align-items: center; }
dialog .x { flex: none; border: 2px solid #1e1e1e; background: #fefefe; color: #1e1e1e; font: 400 16px/1 var(--mono); padding: 3px 7px 2px; cursor: pointer; }
dialog .x:hover { background: #1e1e1e; color: #fefefe; }
dialog .bd { display: grid; gap: 16px; padding: 18px 20px 22px; }
dialog h2 { font: 400 22px/1.3 var(--mono); }
dialog .au { font-size: 17px; }
dialog .dt { display: flex; flex-wrap: wrap; gap: 8px; }
dialog .dt span { background: var(--bar); color: var(--on-bar); padding: 3px 7px 2px; font-size: 15px; }
dialog .ab { font-size: 17px; line-height: 1.6; }
dialog .chips { margin: 0; padding: 14px 0 0; background: linear-gradient(90deg, var(--edge) 50%, transparent 0) 0 0 / 6px 2px repeat-x; }

footer { background: #1e1e1e var(--dots-ink); color: #fefefe; padding: 48px var(--gut) 64px; }
footer .foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; max-width: var(--max); margin: 0 auto; }
footer .foot-logo .px { width: 96px; height: 78px; }
footer .foot-logo .px .m { fill: #ff5c1a; }
footer .foot-logo .px .o { fill: #ffa66b; }
footer .fwin { max-width: 760px; min-width: 0; flex: 1 1 360px; border: 2px solid #fefefe; box-shadow: 4px 4px 0 #ff5c1a; }
footer .fwin .win-t { border-bottom-color: #fefefe; }
footer .fwin .win-t::before { background: #fefefe; }
footer .fwin .win-b { background: #fefefe; color: #1e1e1e; padding: 14px 16px; font-size: 17px; line-height: 1.5; }
footer .fwin a { text-underline-offset: 3px; }

@media (max-width: 760px) {
  .banner { grid-template-columns: 1fr; gap: 18px; padding-top: 80px; padding-bottom: 26px; }
  .banner .logo .px { width: 112px; height: 91px; }
  .banner .sub { min-height: 0; margin-top: 14px; }
  .top .brand span.w { display: none; }
  .search { flex: 1 1 100%; }
  .search input { width: 100%; min-width: 0; }
  .tools { gap: 12px 16px; }
}
@media (max-width: 640px) {
  .top { gap: 6px; }
  .top nav a, .top nav button { padding: 8px 6px 7px; font-size: 15px; }
  .top nav a.hot { margin-left: 2px; }
  .tabs button { font-size: 15px; padding: 6px 8px 5px; }
  .tools .tabs button { font-size: 14px; padding: 5px 6px 4px; }
  .tools .grp { gap: 6px; }
  .tools .grp .tabs { gap: 4px; flex-wrap: nowrap; }
  .cols { display: none !important; }
  #grid { gap: 16px 14px; }
  .sh p { grid-column: 1 / -1; }
  .win-t { font-size: 16px; padding: 6px 7px 5px; gap: 7px; }
  .pg { margin: 8px 8px 0; padding: 10px 26px 12px 11px; }
  .pg .ti { font-size: 17px; }
  .chips { margin: 0 8px; padding: 10px 0; gap: 7px; }
  dialog .bd { padding: 14px 14px 18px; }
  dialog h2 { font-size: 19px; }
}

:root{--s-survey-ecosystem:#0ea5e9;--s-open-decision-models:#7c5ce6;--s-jev-as-judge-classifier:#f59e0b;--s-robustness-attacks:#e5484d;--s-agents-systems:#2f80ed;--s-applications:#12a150;--s-foundations:#8b5e34;}
:root[data-theme="dark"]{--s-survey-ecosystem:#5cc8f5;--s-open-decision-models:#a78bfa;--s-jev-as-judge-classifier:#fbbf4d;--s-robustness-attacks:#ff7b80;--s-agents-systems:#6fa8ff;--s-applications:#4fd18b;--s-foundations:#c9955f;}
