/*
 * The site's system pages, 2026-11-05: search results (components/SearchPage.tsx), news categories (CategoryPage.tsx)
 * and the 404 page (app/(site)/not-found.tsx). The hero is the program pages' (components/PageHero.tsx, styles/hero.css).
 */

.acm-sys {
  --sys-soft: var(--accent-soft);
  --sys-line: var(--accent-line);
}
.acm-sys-note {
  margin: 0 0 22px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--acm-text-2);
}
.acm-sys .acm-sys-link {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.acm-sys .acm-sys-link:hover {
  text-decoration: underline;
}

/* ───────── search ───────── */

.acm-sr-form {
  display: flex;
  gap: 10px;
  margin: 0 0 28px;
}
.acm-sys .acm-sr-form input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 18px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-pill);
  background: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--acm-ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.acm-sys .acm-sr-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 206, 0.12);
}
.acm-sys .acm-sr-form button {
  height: 50px;
  padding: 0 26px;
}
.acm-sr-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.acm-sr-list li + li {
  border-top: 1px solid var(--sys-line);
}
.acm-sys .acm-sr-hit {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  padding: 20px 0;
  color: inherit;
  text-decoration: none;
}
.acm-sr-hit__img {
  display: block;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--acm-placeholder);
}
.acm-sr-hit__img img,
.acm-sr-hit__noimg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.acm-sr-hit:hover .acm-sr-hit__img img {
  transform: scale(1.05);
}
.acm-sr-hit__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.acm-sr-hit__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 14px;
  color: var(--acm-muted);
}
.acm-sr-hit__kind {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--sys-soft);
  font-weight: 700;
  color: var(--accent);
}
.acm-sr-hit__title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--acm-ink);
  transition: color 0.2s;
}
.acm-sr-hit:hover .acm-sr-hit__title {
  color: var(--accent);
}
.acm-sr-hit__text {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.45;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* pages */
.acm-sys-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--sys-line);
  font-family: var(--font-head);
  font-size: 14px;
}
.acm-sys .acm-sys-pager__arrow {
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.acm-sys-pager__arrow.is-off {
  color: var(--acm-faint);
}
.acm-sys-pager__pages {
  display: flex;
  gap: 6px;
}
.acm-sys-pager__gap {
  align-self: center;
  color: var(--acm-faint);
}

/* ───────── category ───────── */

.acm-sys .acm-cg-main {
  max-width: calc(1320px + 10px);
  padding: 24px 5px 90px;
}
.acm-cg-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 0 10px;
}
.acm-cg-head .acm-sys-note {
  margin-bottom: 16px;
}
.acm-sys .acm-cg-grid {
  max-width: none;
  margin-top: 0;
}

/* ───────── 404 ───────── */

.acm-nf__code {
  margin: 0;
  font-family: var(--font-head);
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: rgba(255, 255, 255, 0.6);
}
.acm-sys .acm-nf__main {
  max-width: calc(720px + 2 * var(--gutter));
  padding-top: 36px;
  text-align: center;
}
.acm-nf__text {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--acm-text);
}
.acm-nf__text--en {
  color: var(--acm-muted);
}
.acm-nf__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

@media (max-width: 767px) {
  .acm-sys .acm-sr-form button {
    padding: 0 18px;
  }
  .acm-sys .acm-sr-hit {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 14px;
    padding: 16px 0;
  }
  .acm-sr-hit__title {
    font-size: 15.5px;
  }
  .acm-sr-hit__text {
    display: none;
  }
  .acm-sys-pager {
    justify-content: center;
  }
  .acm-nf__code {
    font-size: 48px;
  }
}
