/* Research archive: page header, toolbar, compact result rows, mascot states. Loaded after site.css. */
.r-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; padding: clamp(20px, 4vw, 40px) 0 20px; }
.r-head .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--violet); margin: 0; }
.r-head h1 { font-size: clamp(30px, 4.2vw, 46px); letter-spacing: -0.025em; margin: 8px 0 10px; }
.r-head .lede { color: var(--muted); max-width: 62ch; font-size: 16px; line-height: 1.6; margin: 0; }
.r-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13.5px; color: var(--muted); max-width: 70ch; }
.r-note svg { flex: none; width: 18px; height: 18px; color: var(--violet); margin-top: 1px; }
.r-quick { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 2px; margin: 4px 0 18px; scrollbar-width: none; }
.r-quick::-webkit-scrollbar { display: none; }
.r-quick button {
  flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--sep);
  background: transparent; color: var(--fg); font: 500 13.5px/1 system-ui, sans-serif; cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.r-quick button:hover { background: var(--surface); }
.r-quick button[aria-pressed="true"] { background: var(--violet2); border-color: transparent; color: var(--accent-ink); }

/* stats */
#stats.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 20px; border: 1px solid var(--sep); border-radius: 14px; background: var(--surface); overflow: hidden; }
#stats .stat { padding: 14px 16px; border: 0; border-radius: 0; background: transparent; }
#stats .stat + .stat { border-left: 1px solid var(--sep); }
#stats .stat .n { font-family: Sora, system-ui, sans-serif; font-size: 22px; font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; }
#stats .stat .l { font-size: 12.5px; color: var(--muted); }

/* toolbar */
.search-bar { margin: 0 0 10px; }
.search-bar label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.search-bar input[type="search"] {
  width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--sep); background: var(--surface);
  color: var(--fg); padding: 0 16px 0 44px; font-size: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.75' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 15px 50%;
}
.search-bar input[type="search"]:focus { outline: 2px solid var(--violet); outline-offset: 1px; border-color: transparent; }
form.filters { background: transparent; border: 0; padding: 0; margin: 0 0 18px; gap: 10px; }
form.filters .field label { font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }
form.filters select { min-height: 44px; border-radius: 10px; border: 1px solid var(--sep); background-color: var(--surface); color: var(--fg); }
form.filters .filter-actions button {
  min-height: 44px; padding: 0 16px; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer;
  border: 1px solid var(--sep); background: transparent; color: var(--fg); box-shadow: none;
}
form.filters .filter-actions button.primary { background: var(--violet2); color: var(--accent-ink); border-color: transparent; box-shadow: none; }
.meta-row .count { font-size: 14px; color: var(--muted); }

/* result rows */
.list { gap: 12px; }
.news-card { border-radius: 14px; transition: border-color 0.2s var(--ease); }
.news-card:hover { border-color: color-mix(in srgb, var(--violet) 50%, var(--sep)); transform: none; }
@media (min-width: 640px) {
  .news-card { grid-template-columns: 200px minmax(0, 1fr); min-height: 0; }
  .news-media { aspect-ratio: auto; min-height: 150px; height: 100%; }
}
.news-media { background: var(--surface-2); }
html[data-theme="light"] .news-media { background: var(--surface-2); }
.news-body { padding: 16px 18px; }
.news-body h2 { font-size: 16.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-body .summary { font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.news-body > .chips:not(:first-child) { display: none; }
.news-body .chip { font-size: 11.5px; border-radius: 6px; }
.news-actions .detail-btn { min-height: 36px; display: inline-flex; align-items: center; font-weight: 600; font-size: 13.5px; color: var(--violet); text-decoration: none; background: none; border: 0; padding: 0; box-shadow: none; }
.pager button { min-height: 44px; border-radius: 10px; border: 1px solid var(--sep); background: transparent; color: var(--fg); font-weight: 600; padding: 0 18px; box-shadow: none; }

/* states with the mascot */
.state.r-state { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 48px 16px; color: var(--muted); }
.state.r-state strong { color: var(--fg); font-size: 16px; }

@media (max-width: 760px) {
  .r-head { grid-template-columns: minmax(0, 1fr); }
  .r-head nama-bot { display: none; }
  #stats.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #stats .stat:nth-child(3) { border-left: 0; }
  #stats .stat:nth-child(n+3) { border-top: 1px solid var(--sep); }
}
@media (max-width: 639px) {
  .wrap { padding-left: 16px; padding-right: 16px; overflow-x: clip; }
  .topbar, .hero, .stats, .filters, .meta-row, .pager { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  form.filters { grid-template-columns: repeat(2, minmax(0, 1fr)); display: grid; width: auto; }
  form.filters .filter-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .news-card { grid-template-columns: 96px minmax(0, 1fr); border-radius: 14px; border: 1px solid var(--sep); }
  .news-media { aspect-ratio: auto; min-height: 0; height: 100%; }
  .news-media > img, .news-media.media-logo > img, .news-media.media-brand > img { position: absolute; inset: 0; width: 100%; height: 100%; }
  .news-body { padding: 12px 14px; }
  .news-body h2 { font-size: 15px; }
  .news-body .summary { -webkit-line-clamp: 2; font-size: 13.5px; }
  .news-body .chips .chip:nth-child(n+3) { display: none; }
}

/* fixes after review */
#stats.stats:empty { display: none; }
.news-card.card { padding: 0; }
.news-body h2 { font-family: Sora, system-ui, sans-serif; letter-spacing: -0.005em; font-weight: 700; }
/* generated placeholders are not shown in the list: text-only rows read cleaner than a violet block */
.news-media.media-brand { display: none; }
.news-card:has(> .news-media.media-brand) { grid-template-columns: minmax(0, 1fr); }
.news-media[data-needs-preview] .ph { opacity: 0; }
.news-media.media-logo { background: var(--surface-2); }
.news-media.media-logo > img { object-fit: contain; padding: 22%; }
