/* Homepage selection: topic keys are shared with the full publication catalog. */
.home-research [hidden] { display: none !important; }
.home-research-controls { margin: 0 0 14px; }
.home-topic-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.home-topic-button {
  --topic-accent: #475569;
  --topic-tint: #eef2f6;
  --topic-border: #94a3b8;
  --topic-count-bg: #e9eef3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid #dbe3e8;
  border-radius: 7px;
  background: #fff;
  color: #475569;
  font: 500 13px/1.45 var(--site-font-sans, sans-serif);
  text-align: center;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}
.home-topic-button[data-home-topic="learning"] { --topic-accent: #166f64; --topic-tint: #edf7f2; --topic-border: #8cbfaf; --topic-count-bg: #e5f2eb; }
.home-topic-button[data-home-topic="games"] { --topic-accent: #4e5d96; --topic-tint: #f1f3fb; --topic-border: #a4aed5; --topic-count-bg: #e9edf9; }
.home-topic-button[data-home-topic="systems"] { --topic-accent: #91652c; --topic-tint: #faf4e9; --topic-border: #ceb180; --topic-count-bg: #f5ecd9; }
.home-topic-button .ui-icon { flex: 0 0 16px; width: 16px; height: 16px; color: var(--topic-accent); }
.home-topic-label { min-width: 0; }
.home-topic-count { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 999px; background: var(--topic-count-bg); color: var(--topic-accent); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; box-sizing: border-box; }
.home-topic-button:hover { border-color: var(--topic-border); background: var(--topic-tint); color: var(--topic-accent); }
.home-topic-button[aria-pressed="true"] { border-color: var(--topic-border); background: var(--topic-tint); color: var(--topic-accent); font-weight: 600; box-shadow: inset 0 -1px 0 var(--topic-border); }
.home-topic-button:focus-visible { outline: 2px solid var(--topic-accent); outline-offset: 3px; }
.home-refined .home-research-status { margin: 9px 0 0; color: #64748b; font: 400 12.5px/1.5 var(--site-font-sans, sans-serif); }
.home-refined .home-publication-first-visible { padding-top: 6px; }
.home-refined .home-publication-summary { margin: 0 0 8px; color: #334155; font-size: 14.5px; line-height: 1.6; }
@media (max-width: 780px) {
  .home-topic-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .home-topic-button { min-width: 0; min-height: 44px; justify-content: flex-start; padding: 8px 9px; font-size: 12.5px; text-align: left; }
  .home-topic-label { flex: 1; }
  .home-topic-count { margin-left: auto; }
}
@media (prefers-color-scheme: dark) {
  .home-topic-button { --topic-accent: #b9c7d5; --topic-tint: #293948; --topic-border: #657586; --topic-count-bg: #283a49; border-color: #394956; background: #172633; color: #bccad6; }
  .home-topic-button[data-home-topic="learning"] { --topic-accent: #94d6c2; --topic-tint: #1b3735; --topic-border: #4d8678; --topic-count-bg: #23483f; }
  .home-topic-button[data-home-topic="games"] { --topic-accent: #a8b9eb; --topic-tint: #26314a; --topic-border: #637bad; --topic-count-bg: #2e3c5b; }
  .home-topic-button[data-home-topic="systems"] { --topic-accent: #e0c18c; --topic-tint: #3c3324; --topic-border: #927b51; --topic-count-bg: #51432c; }
  .home-refined .home-research-status { color: #a6b7c5; }
  .home-refined .home-publication-summary { color: #ccd7df; }
}
@media (prefers-reduced-motion: reduce) { .home-topic-button { transition: none; } }
@media print {
  .home-research-controls { display: none; }
  .home-research [data-home-research-entry][hidden] { display: grid !important; }
}
