/* 首页专属规则：原 assets/polish.css 中的 .home-page 规则，按原相对顺序迁入。 */

.home-page .header-inner {
  min-height: 76px;
}
.home-page .brand {
  display: flex;
  align-items: center;
  letter-spacing: 0.08em;
}
.home-page .brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
}
.home-page nav a {
  padding: 8px 12px;
  border-radius: 8px;
}
.home-page nav a:hover {
  background: var(--white);
}
.home-page .hero {
  padding: 52px 0 36px;
  gap: 64px;
  align-items: center;
  margin-bottom: 0;
  grid-template-columns: 1.6fr 1fr;
}
.home-page .hero h1 {
  font-size: clamp(32px, 4.1vw, 56px);
  line-height: 1.3;
  letter-spacing: -0.055em;
  margin: 18px 0;
}
.home-page .hero > div > p {
  font-size: 14px;
  line-height: 1.95;
  max-width: 530px;
  margin-bottom: 24px;
}
.home-page .hero .primary {
  min-height: 44px;
  padding: 11px 20px;
  font-weight: 650;
  border-radius: 12px;
}
.home-page .hero-note {
  position: relative;
  padding: 26px;
  border-radius: 20px;
  box-shadow: 0 12px 28px #14221e12;
}
.home-page .hero-note h2 {
  font-size: 27px;
  margin: 10px 0 18px;
}
.home-page .hero-note p {
  font-size: 12px;
  line-height: 1.9;
  margin: 16px 0 12px;
}
.home-page .hero-note > a {
  font-size: 12px;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #b8c7bc30;
  padding-top: 14px;
}
.home-page .stats {
  padding: 20px 0;
  margin: 0 0 40px;
}
.home-page .section-title {
  align-items: center;
  margin-bottom: 16px;
}
.home-page .section-title h2 {
  font-size: 23px;
}
.home-page .section-title .eyebrow {
  font-size: 9px;
  margin-left: 8px;
  letter-spacing: 0.1em;
}
.home-page .section-title p {
  font-size: 12px;
  margin: 6px 0 0;
}
.home-page .toolbar {
  margin-bottom: 14px;
}
.home-page .filters {
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 16px;
  gap: 14px 16px;
  margin-bottom: 0;
}
.home-page .filters label {
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.02em;
  display: flex;
  flex-direction: column;
}
.home-page .filters :is(input, select, button) {
  font-size: 12px;
  height: 40px;
  border-radius: 9px;
  margin-top: 7px;
  font-weight: 400;
}
.home-page .filters input {
  background: var(--paper);
}
.home-page .result-line {
  margin: 18px 2px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.home-page .cards {
  gap: 16px;
}
.home-page .card {
  padding: 23px;
  border-radius: 16px;
  box-shadow: 0 3px 10px #14221e04;
  transition:
    transform 0.22s cubic-bezier(0.2, 0, 0, 1),
    box-shadow 0.22s cubic-bezier(0.2, 0, 0, 1),
    border-color 0.22s cubic-bezier(0.2, 0, 0, 1);
}
.home-page .card:hover {
  box-shadow: 0 10px 24px #14221e0c;
  border-color: var(--muted);
}
.home-page .card-top {
  margin-bottom: 22px;
}
.home-page .card-top .eyebrow {
  font-size: 10px;
  letter-spacing: 0.08em;
}
.home-page .pill {
  border: 1px solid var(--line);
  font-size: 10px;
  padding: 3px 9px;
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
.home-page .card h3 {
  font-size: 20px;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}
.home-page .card p {
  font-size: 12px;
  line-height: 1.9;
  margin-bottom: 20px;
}
.home-page .tags {
  gap: 5px;
  margin-bottom: 20px;
}
.home-page .tags span {
  font-size: 10px;
  padding: 3px 7px;
  border-radius: 6px;
}
.home-page .card-actions {
  padding-top: 14px;
  gap: 8px;
}
.home-page .card-actions .button {
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 11px;
}
.home-page .list .card {
  padding: 20px 24px;
}
.home-page .list .card :is(h3, p, .tags, .card-top) {
  margin: 0;
}
.home-page .guides {
  gap: 12px;
}
.home-page .guide {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.22s cubic-bezier(0.2, 0, 0, 1);
}
.home-page .guide:hover {
  border-color: var(--muted);
}
.home-page .guide h3 {
  font-size: 18px;
  margin: 8px 0 16px;
}
.home-page .guide span {
  font-size: 10px;
  color: var(--muted);
}
.home-page .guide a {
  font-size: 11px;
  text-underline-offset: 5px;
}
.home-page .about {
  padding: 30px 34px;
  border-radius: 16px;
}
.home-page .about h2 {
  font-size: 22px;
}
.home-page .about p {
  font-size: 13px;
  line-height: 1.95;
  max-width: 900px;
}
@media (max-width: 1000px) {
  .home-page .hero {
    gap: 28px;
    grid-template-columns: 1.3fr 1fr;
  }
  .home-page .hero h1 {
    font-size: 40px;
  }
  .home-page .hero-note {
    padding: 22px;
  }
}
@media (max-width: 700px) {
  .home-page .header-inner {
    min-height: 92px;
    gap: 14px;
  }
  .home-page .site-header nav {
    gap: 4px;
  }
  .home-page nav a {
    padding: 4px 8px;
  }
  .home-page .hero {
    grid-template-columns: 1fr;
    padding: 28px 0;
    gap: 24px;
  }
  .home-page .hero h1 {
    font-size: 34px;
  }
  .home-page .hero .eyebrow {
    font-size: 9px;
    letter-spacing: 0.06em;
  }
  .home-page .hero-note {
    padding: 20px;
  }
  .home-page .comparison-motif {
    display: none;
  }
  .home-page .hero-note h2 {
    margin: 8px 0 10px;
    font-size: 24px;
  }
  .home-page .stats {
    margin-bottom: 28px;
    gap: 16px 0;
  }
  .home-page .stats div {
    padding-left: 16px;
  }
  .home-page .stats div:nth-child(odd) {
    padding-left: 0;
  }
  .home-page .stats strong {
    font-size: 27px;
  }
  .home-page .section-title {
    align-items: flex-start;
    gap: 8px;
  }
  .home-page .section-title h2 {
    font-size: 21px;
  }
  .home-page .section-title .eyebrow {
    display: block;
    margin: 4px 0 0;
  }
  .home-page .filters {
    padding: 14px;
    gap: 12px;
  }
  .home-page .card {
    padding: 21px;
  }
  .home-page .about {
    padding: 24px;
  }
}
.home-page .compact-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 28px 0 18px;
}
.home-page .compact-hero h1 {
  font-size: clamp(26px, 3vw, 38px);
  margin: 10px 0;
}
.home-page .stats {
  padding: 12px 0;
  margin-bottom: 24px;
}
.home-page .stats strong {
  font-size: 22px;
}
.home-page .primary-filters {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr);
  padding: 14px 18px;
}
.home-page .secondary-filters {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  padding: 12px 0 0;
}
.home-page .topic-metrics {
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 700px) {
  .home-page .compact-hero {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 18px;
  }
  .home-page .compact-hero > a {
    justify-self: start;
  }
  .home-page .primary-filters,
  .home-page .secondary-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }
  .home-page .secondary-filters label:first-child {
    grid-column: auto;
  }
}
/* Homepage gallery. Palette overrides are scoped to this page. */
#mobile-filter-toggle {
  display: none;
}
.home-page {
  background: var(--paper);
  color: var(--ink);
}
.home-page .container {
  width: min(1240px, calc(100% - 64px));
}
.home-page .site-header {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.home-page .header-inner {
  min-height: 64px;
}
.home-page .brand {
  font-size: 13px;
  letter-spacing: 0.06em;
}
.home-page .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
}
.home-page .site-header nav {
  align-items: center;
  gap: 20px;
}
.home-page nav a {
  font-size: 13px;
  padding: 8px 0;
  color: var(--muted);
}
.home-page nav a:hover {
  color: var(--ink);
}
.home-page .compact-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.85fr);
  align-items: center;
  gap: 48px;
  padding: 20px 0;
  margin: 0;
}
.home-page .compact-hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.13em;
  color: var(--muted);
}
.archive-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}
.home-page .compact-hero h1 {
  font-size: clamp(36px, 3.5vw, 46px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 8px 0 10px;
  font-weight: 700;
}
.home-page .compact-hero h1 > span {
  color: var(--ink);
}
.home-page .compact-hero h1 .title-period {
  color: var(--accent);
  margin-left: 4px;
}
.home-page .compact-hero > div > p {
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
  color: var(--ink);
}
.home-page .compact-hero > div > .hero-caption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}
.home-page .archive-overview {
  padding: 8px 0 8px 32px;
  border-left: 1px solid var(--line);
}
.home-page .overview-heading {
  font-size: 12px;
  color: var(--muted);
}
.home-page .stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 12px 0 0;
  margin: 0;
  border: 0;
}
.home-page .stats div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0;
  border: 0;
}
.home-page .stats strong {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.home-page .stats span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.home-page #projects {
  scroll-margin-top: 20px;
  margin: 0 0 56px;
}
.home-page .section-title h2 {
  font-size: 22px;
  font-weight: 650;
  margin: 0;
}
.home-page .section-title p {
  font-size: 13px;
  margin: 0;
}
.home-page .directory-panel {
  padding: 0 0 4px;
}
.home-page .directory-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.home-page .directory-note {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.home-page .segments {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  gap: 20px;
}
.home-page .testing-tabs a {
  text-decoration: none;
  font-size: 14px;
  color: var(--muted);
  padding: 13px 0 11px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.home-page .testing-tabs a[aria-current] {
  color: var(--accent);
  border-color: var(--accent);
  background: transparent;
  font-weight: 650;
}
.home-page .filter-layout {
  position: relative;
}
.home-page .primary-filters {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 140px 185px auto;
  gap: 10px;
  padding: 0 96px 0 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.home-page .primary-filters label {
  font-size: 0;
  min-width: 0;
}
.home-page .primary-filters :is(input, select, button) {
  height: 42px;
  margin: 0;
  background: var(--white);
  border-color: var(--line);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 7px;
}
.home-page .primary-filters input {
  padding-left: 38px;
  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='%23667085' stroke-width='1.7'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}
.home-page .primary-filters input::placeholder {
  color: var(--muted);
}
.home-page :is(input, select):hover {
  border-color: #b7bfce;
}
.home-page :is(input, select):focus-visible {
  border-color: var(--accent);
}
.home-page #preview-only[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.home-page .advanced-filters {
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  margin: 0;
}
.home-page .advanced-filters > summary {
  position: absolute;
  top: 0;
  right: 0;
  padding: 11px 0;
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}
.home-page .advanced-filters .secondary-filters {
  grid-column: 1 / -1;
  margin-top: 16px;
}
.home-page .secondary-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 0 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.home-page .secondary-filters label {
  min-width: 0;
  font-size: 12px;
}
.home-page .secondary-filters :is(select, button) {
  min-height: 42px;
  height: auto;
  margin-top: 6px;
  font-size: 13px;
}
.home-page .active-filters {
  margin: 12px 0 0;
}
.home-page .active-filters:empty {
  display: none;
}
.home-page .active-filters button {
  color: var(--accent);
  background: var(--accent-soft);
  border: 0;
  font-size: 12px;
  padding: 6px 10px;
}
.home-page .directory-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 0 16px;
}
.home-page .browse-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  flex-wrap: nowrap;
}
.home-page .browse-toolbar .segments {
  gap: 2px;
  background: var(--surface-muted);
  padding: 3px;
  border-radius: 7px;
}
.home-page .segments button {
  min-height: 32px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  font-size: 13px;
}
.home-page .segments button[aria-pressed="true"] {
  background: var(--white);
  border-color: transparent;
  color: var(--accent);
  box-shadow: 0 1px 4px #18223012;
}
.home-page .result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.home-page .result-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.home-page .result-controls label {
  display: flex;
  align-items: center;
  font-size: 12px;
  white-space: nowrap;
}
.home-page .result-controls select {
  width: auto;
  margin-left: 4px;
  padding: 6px;
  font-size: 12px;
  border: 0;
  background: transparent;
}
.home-page .cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.home-page .card {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 6px #18223004;
  overflow: hidden;
}
.home-page .card:hover {
  transform: translateY(-2px);
  border-color: #c5ccda;
  box-shadow: 0 8px 24px #1822300c;
}
.home-page .topic-card {
  padding: 0;
}
.home-page .topic-cover,
.home-page .run-card-screenshot {
  margin: 0;
  background: var(--surface-muted);
  border: 0;
  position: relative;
}
.home-page .cover-preview {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 8px;
  border: 0;
  border-radius: 0;
  background: var(--surface-muted);
  overflow: hidden;
  cursor: zoom-in;
}
.home-page .cover-hint {
  display: grid;
  place-items: center;
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid #e4e7ecd9;
  border-radius: 8px;
  color: var(--ink);
  background: #fffffff0;
  box-shadow: 0 2px 8px #18223014;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.home-page .cover-hint svg {
  width: 17px;
  height: 17px;
}
.home-page .cover-preview:is(:hover, :focus-visible) .cover-hint {
  opacity: 1;
}
.home-page .cover-preview:focus-visible {
  outline-offset: -3px;
}
.home-page .topic-cover img,
.home-page .run-card-screenshot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 4px;
}
/* 派生封面已经按 16:10 裁好，直接铺满封面盒，不再二次留边。 */
.home-page :is(.topic-cover, .run-card-screenshot) img.cover-image {
  object-fit: cover;
}
.home-page :is(.topic-cover, .run-card-screenshot) figcaption {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  position: static;
  background: var(--white);
  color: var(--muted);
  padding: 8px 22px;
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.home-page :is(.topic-cover, .run-card-screenshot) figcaption > span {
  flex-shrink: 0;
}
.home-page :is(.topic-cover, .run-card-screenshot) figcaption strong {
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  color: var(--muted);
}
.home-page .topic-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  aspect-ratio: 16 / 10;
  padding: 24px;
  background: var(--surface-muted);
  color: var(--muted);
  text-align: center;
}
.home-page .topic-placeholder span {
  font-size: 20px;
}
.home-page .topic-placeholder small {
  font-size: 11px;
}
.home-page .topic-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.home-page .card-top {
  margin: 0;
  gap: 8px 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.home-page .card-top > .eyebrow {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}
.home-page .card-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px 10px;
  max-width: 100%;
  margin-left: auto;
}
.home-page .card-top .card-badges .pill {
  padding: 0;
  line-height: 1.4;
}
.home-page .card-top .pill {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
}
.home-page .card-top .eyebrow {
  font-size: 12px;
  letter-spacing: 0.03em;
  font-weight: 500;
  color: var(--muted);
}
.home-page .execution-mode-chip {
  color: var(--muted);
  background: var(--surface-muted);
  border-color: var(--line);
}
.home-page .card-top .execution-mode-chip {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
}
.home-page .card-top .card-badges > span + span {
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.home-page .card-top .card-badges .score-chip {
  padding: 2px 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}
.home-page .card-top .card-badges .score-unavailable,
.home-page .card-top .card-badges .score-pending {
  border-color: var(--line);
  background: var(--paper);
  color: var(--muted);
}
.home-page .card h3 {
  font-size: 22px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
}
.home-page .topic-body > p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  flex: initial;
}
.home-page .topic-body > p:not(.topic-metrics) {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.4em;
}
.home-page .topic-body .topic-metrics {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  flex: initial;
}
.home-page .topic-metadata {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.home-page .topic-metadata .experiment-info[open] {
  flex-basis: 100%;
}
.home-page .experiment-info {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.home-page .experiment-info > summary {
  cursor: pointer;
  width: max-content;
}
.home-page .latest-run {
  background: transparent;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.home-page .latest-run strong {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.home-page .topic-models summary {
  cursor: pointer;
}
.home-page .topic-models .tags {
  margin: 10px 0;
}
.home-page .preview-source {
  font-size: 11px;
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}
.home-page .card-actions {
  border-top: 1px solid var(--line);
  margin: auto 0 0;
  padding: 12px 0 0;
  gap: 12px;
  justify-content: flex-start;
  font-size: 13px;
  flex-wrap: wrap;
}
.home-page .card-actions .preview-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 15px;
  background: var(--accent);
  border-radius: 7px;
  color: #fff;
  text-decoration: none;
  font-weight: 550;
}
.home-page .card-actions .preview-link:hover {
  background: #2c48bd;
}
.home-page .card-actions a {
  font-weight: 400;
}
.home-page .card-actions :is(.button, button) {
  margin-left: auto;
  padding: 8px 12px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
}
.home-page .card-actions :is(.button, button):hover {
  border-color: var(--accent);
  color: var(--accent);
}
.home-page .card-actions button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.home-page .no-preview {
  color: var(--muted);
  font-size: 12px;
}
.home-page .run-card {
  padding: 0;
}
.home-page .run-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.home-page .run-body > p {
  margin: 0;
}
.home-page .run-card .tags {
  margin: 0;
}
.home-page .run-card .tags span {
  color: var(--muted);
  background: var(--paper);
  font-size: 12px;
}
.home-page .cards.list {
  grid-template-columns: 1fr;
  gap: 16px;
}
.home-page .list .topic-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  align-items: start;
}
.home-page .list .topic-body {
  display: flex;
  padding: 20px 24px;
  gap: 8px;
}
.home-page .list .topic-body > p:not(.topic-metrics) {
  min-height: 0;
}
.home-page .list .topic-card:hover {
  transform: none;
}
.home-page .list .run-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
}
.home-page .list .run-body {
  padding: 20px 24px;
}
.home-page .list .run-body > p {
  grid-column: auto;
}
.home-page .load-row {
  margin: 28px 0 0;
  text-align: center;
}
.home-page .load-row button {
  border: 1px solid var(--line);
  background: transparent;
  padding: 12px 28px;
  font-size: 13px;
}
.home-page #recent-experiments {
  margin: 0 0 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.home-page #recent-experiments .section-title {
  margin-bottom: 20px;
}
.home-page .recent-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
  border: 0;
  background: transparent;
}
.home-page .recent-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "topic date"
    "meta date";
  align-items: center;
  gap: 2px 16px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-decoration: none;
  font-size: 13px;
  background: transparent;
  min-width: 0;
}
.home-page .recent-list a + a {
  border-top: 0;
}
.home-page .recent-list a:hover {
  background: var(--surface-muted);
}
.home-page .recent-list :is(span, strong, time) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-page .recent-topic {
  grid-area: topic;
  font-weight: 500;
}
.home-page .recent-model {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.home-page .recent-meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  min-width: 0;
}
.home-page .recent-date {
  grid-area: date;
  align-self: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.home-page .guide-disclosure {
  padding: 20px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.home-page .guide-disclosure > summary {
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
}
.home-page .guide-disclosure > summary span {
  color: var(--muted);
  font-size: 12px;
  margin-left: 16px;
  font-weight: 400;
}
.home-page .guide-disclosure[open] > summary {
  margin-bottom: 24px;
}
.home-page .guides {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.home-page .about {
  margin: 32px 0 0;
  padding: 26px 30px;
  border-left: 3px solid var(--line);
  border-radius: 0 12px 12px 0;
  background: var(--white);
  box-shadow: none;
}
.home-page .about h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}
.home-page .about p {
  max-width: 780px;
  font-size: 14px;
  line-height: 1.9;
}
.home-page .about a {
  font-size: 12px;
}
.home-page footer {
  border: 0;
  padding: 24px 0 36px;
  font-size: 11px;
}
@media (max-width: 1050px) {
  .home-page .compact-hero {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
  }
  .home-page .archive-overview {
    padding-left: 20px;
  }
  .home-page .primary-filters {
    grid-template-columns: minmax(120px, 1fr) 115px 155px auto;
    gap: 8px;
  }
  .home-page .primary-filters :is(input, select, button) {
    font-size: 13px;
    padding-inline: 8px;
  }
  .home-page .primary-filters input {
    padding-left: 34px;
    background-position: 10px center;
  }
  .home-page .secondary-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-page .directory-bottom {
    gap: 12px;
  }
  .home-page #range {
    display: none;
  }
  .home-page .guides {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .home-page .compact-hero {
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 20px;
  }
  .home-page .directory-note {
    display: none;
  }
  .home-page .stats {
    gap: 10px;
  }
  .home-page .stats strong {
    font-size: 28px;
  }
  .home-page .primary-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
  }
  .home-page .primary-filters label:first-child {
    grid-column: 1 / -1;
  }
  .home-page #preview-only {
    grid-column: 1;
    justify-self: start;
  }
  .home-page .advanced-filters > summary {
    top: 100px;
  }
  .home-page .directory-bottom {
    flex-direction: column;
    align-items: stretch;
  }
  .home-page .browse-toolbar {
    justify-content: space-between;
  }
  .home-page .result-line {
    justify-content: space-between;
  }
}
@media (max-width: 700px) {
  .home-page .container {
    width: calc(100% - 32px);
  }
  .home-page .header-inner {
    min-height: 56px;
    gap: 8px;
  }
  .home-page .brand {
    font-size: 10px;
    letter-spacing: 0;
  }
  .home-page .brand-mark {
    width: 28px;
    height: 28px;
    margin-right: 6px;
    border-radius: 8px;
  }
  .home-page .site-header nav {
    gap: 12px;
    flex-wrap: nowrap;
  }
  .home-page nav a {
    font-size: 12px;
    white-space: nowrap;
  }
  .home-page .compact-hero {
    display: block;
    padding: 12px 0;
  }
  .home-page .compact-hero .eyebrow {
    display: none;
  }
  .home-page .compact-hero h1 {
    font-size: 32px;
    margin: 8px 0;
  }
  .home-page .compact-hero > div > p {
    font-size: 14px;
  }
  .home-page .compact-hero > div > .hero-caption {
    display: none;
  }
  .home-page .archive-overview {
    margin-top: 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .home-page .overview-heading {
    display: none;
  }
  .home-page .stats {
    padding: 0;
    gap: 8px;
  }
  .home-page .stats div {
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 6px;
  }
  .home-page .stats strong {
    font-size: 18px;
  }
  .home-page .stats span {
    font-size: 11px;
  }
  .home-page .directory-panel {
    padding: 0;
  }
  .home-page .directory-controls {
    margin-bottom: 10px;
  }
  .home-page .testing-tabs {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .home-page .testing-tabs a {
    font-size: 12px;
    padding: 10px 0 9px;
  }
  .home-page .primary-filters :is(input, select, button) {
    height: 38px;
    font-size: 13px;
  }
  .home-page .advanced-filters > summary {
    font-size: 12px;
    padding: 10px 0;
    top: 92px;
  }
  .home-page .secondary-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-page .directory-bottom {
    gap: 2px;
    padding: 4px 0 10px;
  }
  .home-page .browse-toolbar {
    gap: 12px;
  }
  .home-page .segments button {
    min-height: 32px;
    font-size: 12px;
    padding: 6px 9px;
  }
  .home-page .result-line {
    gap: 8px;
    font-size: 12px;
  }
  .home-page .result-controls {
    gap: 6px;
  }
  .home-page .result-controls label,
  .home-page .result-controls select {
    font-size: 12px;
  }
  .home-page .cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .home-page .card h3 {
    font-size: 20px;
  }
  .home-page .topic-body > p:not(.topic-metrics) {
    min-height: 0;
  }
  .home-page .topic-body,
  .home-page .run-body {
    padding: 16px;
  }
  .home-page .card-actions {
    gap: 12px;
    font-size: 12px;
  }
  .home-page .card-actions a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
  .home-page .card-actions .button {
    padding: 8px 10px;
    font-size: 12px;
  }
  .home-page .list .run-card,
  .home-page .list .topic-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .home-page .list .run-body,
  .home-page .list .topic-body {
    padding: 12px;
  }
  .home-page .list .run-body > p,
  .home-page .list .topic-body > p:not(.topic-metrics) {
    display: none;
  }
  .home-page .list .topic-body h3 {
    font-size: 16px;
  }
  .home-page .list .card-actions {
    gap: 8px;
  }
  .home-page .list .card-actions .button {
    margin-left: 0;
  }
  .home-page .list :is(.topic-cover, .run-card-screenshot) figcaption {
    padding: 8px;
    font-size: 11px;
    overflow-wrap: anywhere;
    flex-wrap: wrap;
    white-space: normal;
  }
  .home-page .list :is(.topic-cover, .run-card-screenshot) figcaption strong {
    overflow: visible;
    overflow-wrap: anywhere;
  }
  .home-page .list .cover-preview {
    padding: 4px;
  }
  .home-page .list .cover-hint {
    bottom: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 5px;
  }
  .home-page .list .topic-placeholder {
    padding: 12px;
  }
  .home-page .list .topic-placeholder span {
    font-size: 12px;
  }
  .home-page #recent-experiments .section-title p {
    display: none;
  }
  .home-page .recent-list {
    grid-template-columns: 1fr;
  }
  .home-page .recent-list a {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
  }
  .home-page .guide-disclosure > summary span {
    display: block;
    margin: 6px 0 0;
  }
  .home-page .about {
    padding: 20px;
  }
}
.home-page.preview-open {
  overflow: hidden;
}
.home-page .preview-dialog {
  width: min(1200px, calc(100% - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
}
.home-page .preview-dialog[open] {
  display: flex;
  flex-direction: column;
}
.home-page .preview-dialog::backdrop {
  background: #182230c9;
  backdrop-filter: blur(5px);
}
.home-page .preview-dialog button {
  width: auto;
  margin: 0;
  min-height: 40px;
}
.home-page .preview-header,
.home-page .preview-toolbar,
.home-page .preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  flex-shrink: 0;
}
.home-page .preview-header h2 {
  margin: 4px 0 0;
  font-size: 22px;
}
.home-page .preview-header .eyebrow {
  color: var(--accent);
  font-size: 10px;
}
.home-page #preview-close {
  flex-shrink: 0;
  font-size: 13px;
}
.home-page .preview-toolbar {
  padding-top: 0;
  padding-bottom: 8px;
}
.home-page .preview-toolbar label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 12px;
  flex: 1;
}
.home-page #preview-version {
  width: min(100%, 540px);
  min-width: 0;
  flex: 1;
  font-size: 13px;
}
.home-page .preview-toolbar .segments {
  gap: 4px;
  flex-shrink: 0;
}
.home-page .preview-caption {
  font-size: 12px;
  margin: 0;
  padding: 4px 24px 12px;
  color: var(--muted);
}
.home-page .preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  height: min(65dvh, 720px);
  background: var(--surface-muted);
  border-block: 1px solid var(--line);
}
.home-page .preview-stage img,
.home-page .preview-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  border: 0;
}
.home-page .preview-stage iframe {
  background: #fff;
}
.home-page .preview-message {
  padding: 24px;
  text-align: center;
}
.home-page .preview-message h3 {
  margin: 0 0 12px;
}
.home-page .preview-message p {
  font-size: 14px;
}
.home-page .preview-footer {
  font-size: 12px;
  padding: 12px 24px;
}
.home-page #preview-status {
  color: var(--muted);
}
.home-page .preview-footer > div {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.home-page .preview-footer .primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.home-page :is(button, a, select, input, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 700px) {
  .home-page .preview-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
  }
  .home-page .preview-header,
  .home-page .preview-toolbar,
  .home-page .preview-footer {
    padding: 12px;
    gap: 10px;
  }
  .home-page .preview-header h2 {
    font-size: 18px;
  }
  .home-page .preview-toolbar,
  .home-page .preview-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .home-page .preview-toolbar label {
    display: block;
  }
  .home-page #preview-version {
    width: 100%;
    margin-top: 6px;
  }
  .home-page .preview-caption {
    padding: 0 12px 10px;
    font-size: 11px;
  }
  .home-page .preview-stage {
    height: 52dvh;
  }
  .home-page .preview-footer > div {
    flex-wrap: wrap;
    gap: 12px;
  }
}
.home-page .image-feedback {
  position: absolute;
  inset: 35% 12px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}
.home-page .image-feedback button {
  pointer-events: auto;
  min-height: 44px;
}
.home-page .image-failed img {
  visibility: hidden;
}
.home-page .image-failed .cover-hint {
  display: none;
}
.home-page .preview-toolbar label {
  font-size: 14px;
  font-weight: 600;
}
.home-page :is(.topic-metrics, .result-line, .card-actions) {
  font-size: 13px;
}
@media (max-width: 700px) {
  .home-page #mobile-filter-toggle {
    display: inline-flex;
    position: absolute;
    top: 0;
    right: 0;
    min-height: 44px;
    width: 72px;
    font-size: 14px;
  }
  .home-page .primary-filters {
    padding: 0;
  }
  .home-page .primary-filters label:first-child {
    grid-column: 1 / -1;
    margin-right: 82px;
  }
  .home-page .primary-filters :is(input, select, button) {
    height: 44px;
    font-size: 14px;
  }
  .home-page
    .filter-layout:not(.filters-expanded)
    .primary-filters
    > :not(:first-child) {
    display: none;
  }
  .home-page .filter-layout:not(.filters-expanded) .advanced-filters {
    display: none;
  }
  .home-page .advanced-filters > summary {
    position: static;
    padding: 10px 0 0;
    font-size: 13px;
  }
  .home-page .cover-preview {
    aspect-ratio: 16 / 10;
    padding: 6px;
  }
  .home-page .topic-body {
    padding: 6px 14px;
  }
  .home-page .topic-body > p:not(.topic-metrics) {
    line-height: 1.55;
  }
  .home-page :is(.topic-cover, .run-card-screenshot) figcaption {
    font-size: 12px;
    padding: 6px 14px;
  }
  .home-page .card-actions {
    gap: 8px 12px;
    padding-top: 8px;
  }
  .home-page .card-actions :is(a, button) {
    min-height: 44px;
  }
  .home-page .card-actions .preview-link {
    min-height: 44px;
  }
  .home-page .result-line {
    flex-wrap: wrap;
  }
  .home-page .list .image-feedback {
    inset: 12px 2px auto;
    flex-direction: column;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-page .card,
  .home-page .cover-hint {
    transition: none;
  }
  .home-page .card:hover {
    transform: none;
  }
}
/* Guide availability and date controls share the directory typography. */
.home-page .guide small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 12px;
}
.home-page #recent-experiments .section-title {
  flex-wrap: wrap;
  gap: 12px;
}

/* Counts and captions have one explicit scope and one score per card. */
.home-page .stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.home-page .overview-heading {
  display: block;
}
.home-page .topic-cover figcaption {
  flex-wrap: wrap;
  gap: 4px 10px;
}
.home-page .topic-cover figcaption strong {
  white-space: normal;
}
.home-page .topic-card .card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.home-page .topic-card .card-actions [data-compare] {
  margin-left: auto;
}
@media (max-width: 700px) {
  .home-page .overview-heading {
    font-size: 10px;
    margin-bottom: 4px;
  }
  .home-page .topic-cover figcaption {
    font-size: 11px;
  }
  .home-page .topic-card .topic-body > p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
/* Directory density and fast, explicit evidence filters. */
.home-page .quick-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.home-page .quick-filters button {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}
.home-page .primary-filters {
  grid-template-columns: minmax(0, 1fr) 140px 185px;
}
.home-page .cards.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.home-page .compact .cover-preview {
  aspect-ratio: 16 / 10;
  padding: 6px;
}
.home-page .compact :is(.topic-body, .run-body) {
  padding: 12px 14px;
}
.home-page .compact h3 {
  font-size: 19px;
}
.home-page .compact .topic-body > p {
  min-height: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-page .compact .card-actions {
  gap: 6px 8px;
  flex-wrap: wrap;
}
.home-page .compact .card-actions :is(a, button) {
  font-size: 12px;
}
.home-page .compact .card-top > .eyebrow {
  display: none;
}
.home-page .compact .card-badges {
  justify-content: flex-start;
}
.home-page .run-list-score,
.home-page .run-list-date {
  display: none;
}
.home-page .card.last-visited {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.home-page .card.last-visited h3::after {
  content: "刚刚查看";
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  font-weight: 500;
  color: var(--accent);
}
.home-page #run-grouping-control {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.home-page #run-grouping {
  width: auto;
}
.home-page .run-ledger {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.home-page .run-ledger .run-card,
.home-page .run-list-heading {
  display: grid;
  grid-template-columns:
    88px minmax(140px, 1.2fr) minmax(150px, 1fr)
    104px 88px 232px;
  align-items: center;
  column-gap: 16px;
  row-gap: 0;
  padding: 12px;
}
.home-page .run-list-heading {
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 2;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.home-page .run-ledger .run-card {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  transform: none;
}
.home-page .run-ledger .run-body {
  display: contents;
}
.home-page .run-ledger :is(.card-top, .run-body > p, figcaption) {
  display: none;
}
.home-page .run-ledger .cover-preview {
  aspect-ratio: 4/3;
  padding: 0;
}
.home-page .run-ledger h3 {
  grid-column: 2;
  grid-row: 1;
  font-size: 14px;
}
.home-page .run-topic {
  display: none;
}
.home-page .run-ledger .run-topic {
  display: block;
  grid-column: 2;
  grid-row: 2;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-page .run-ledger .tags {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.home-page .run-ledger .tags span {
  padding: 0;
  background: transparent;
  font-size: 12px;
}
.home-page .run-ledger .run-list-score {
  display: block;
  grid-column: 4;
  grid-row: 1;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.home-page .run-ledger .run-list-date {
  display: block;
  grid-column: 5;
  grid-row: 1;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.home-page .run-ledger .card-actions {
  grid-column: 6;
  grid-row: 1;
  display: flex;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
  border: 0;
  gap: 6px 10px;
}
.home-page .run-ledger .topic-placeholder {
  min-height: 64px;
  padding: 6px;
  font-size: 11px;
}
.home-page .run-group-title {
  margin: 0;
  padding: 14px;
  font-size: 14px;
  background: var(--accent-soft);
}
.home-page .run-card:has([data-compare][aria-pressed="true"]) {
  background: var(--accent-soft);
}
@media (min-width: 701px) and (max-width: 1100px) {
  .home-page .cards.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-page .run-ledger .run-card,
  .home-page .run-list-heading {
    grid-template-columns:
      64px minmax(110px, 1fr) minmax(125px, 1fr)
      90px 80px 100px;
    gap: 10px;
  }
}
@media (max-width: 700px) {
  .home-page .cards.compact {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-page .primary-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-page .quick-filters {
    flex-wrap: nowrap;
    gap: 6px;
  }
  .home-page .quick-filters button {
    min-height: 44px;
    font-size: 12px;
  }
  .home-page .compact .cover-preview {
    aspect-ratio: auto;
    height: 170px;
  }
  .home-page .browse-toolbar {
    gap: 8px;
    justify-content: space-between;
  }
  .home-page .browse-toolbar .segments button {
    padding: 6px 8px;
    font-size: 12px;
  }
  .home-page .run-list-heading {
    display: none;
  }
  .home-page .run-ledger .run-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px 12px;
  }
  .home-page
    .run-ledger
    :is(h3, .tags, .run-list-score, .run-list-date, .card-actions) {
    grid-column: 2;
    grid-row: auto;
  }
  .home-page .run-ledger :is(.run-card-screenshot, .topic-placeholder) {
    grid-row: 1 / 4;
  }
  .home-page .run-ledger .tags {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .home-page .run-ledger .card-actions {
    grid-column: 1 / -1;
  }
  .home-page .run-ledger .card-actions :is(a, button) {
    min-height: 44px;
  }
}
/* A focused picker keeps large candidate sets out of gallery cards. */
.home-page button.topic-metrics {
  border: 0;
  border-radius: 0;
  padding: 0;
  min-height: 30px;
  background: transparent;
  color: var(--accent);
  text-align: left;
  justify-content: flex-start;
}
#quick-picker {
  width: min(900px, calc(100vw - 32px));
  max-width: calc(100vw - 20px);
  max-height: 88dvh;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
}
#quick-picker::backdrop {
  background: #18223080;
}
.quick-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.quick-heading h2 {
  margin: 6px 0;
  font-size: 22px;
}
.quick-heading > div {
  flex: 1;
  min-width: 0;
}
#quick-close {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
}
.quick-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.quick-controls label {
  flex: 1;
  min-width: 140px;
  font-size: 12px;
  color: var(--muted);
}
.quick-note,
#quick-count {
  font-size: 12px;
}
.quick-note {
  margin-top: 12px;
  color: var(--muted);
}
.quick-candidate {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 110px 100px;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.quick-image img {
  display: block;
  width: 96px;
  height: 70px;
  object-fit: contain;
  background: var(--paper);
  border-radius: 6px;
}
.quick-image span {
  color: var(--muted);
  font-size: 12px;
}
.quick-identity {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
}
.quick-identity small {
  color: var(--muted);
}
.quick-candidate:has([aria-pressed="true"]) {
  background: var(--accent-soft);
}
.quick-footer {
  position: sticky;
  bottom: -20px;
  padding: 12px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--white);
  border-top: 1px solid var(--line);
  font-size: 12px;
}
#quick-selection {
  margin-left: auto;
}
#quick-more {
  display: flex;
  margin: 12px auto;
}
@media (max-width: 700px) {
  .home-page .compact .cover-preview {
    height: 148px;
  }
  #quick-picker {
    padding: 14px;
    width: calc(100vw - 20px);
  }
  .quick-heading h2 {
    font-size: 18px;
  }
  .quick-candidate {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px 12px;
  }
  .quick-image {
    grid-row: 1 / 3;
  }
  .quick-image img {
    width: 64px;
    height: 56px;
  }
  .quick-score {
    grid-column: 2;
  }
  .quick-candidate > button {
    grid-column: 2;
    min-height: 44px;
    justify-self: start;
  }
  .quick-footer {
    bottom: -14px;
  }
  .quick-footer > a:first-child {
    width: 100%;
  }
  #quick-selection {
    margin-left: 0;
  }
  #quick-start {
    margin-left: auto;
    min-height: 44px;
  }
}

/* 目录结果常驻，手机把组织、视图和排序收进同一入口。 */
.display-options {
  position: relative;
}
.display-options > summary {
  display: none;
  cursor: pointer;
}
.display-options-body {
  display: flex;
  align-items: center;
  gap: 16px;
}
@media (min-width: 701px) {
  .home-page .directory-bottom {
    flex-direction: row-reverse;
  }
}
@media (max-width: 700px) {
  .home-page .directory-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding-bottom: 12px;
    position: relative;
  }
  .home-page .result-line {
    display: block;
  }
  .home-page #sort-context {
    display: none;
  }
  .display-options > summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 13px;
    color: var(--accent);
  }
  .display-options-body {
    position: absolute;
    top: 100%;
    right: 0;
    width: min(358px, calc(100vw - 32px));
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    box-shadow: 0 8px 24px #18223018;
    z-index: 5;
  }
  .home-page .display-options .result-controls {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .home-page .display-options .segments button {
    min-height: 44px;
  }
  .home-page .compact-hero {
    padding: 8px 0;
  }
  .home-page .archive-overview {
    margin-top: 8px;
  }
}

/* 手机图像按原图比例展示，长图在预览区域内滚动。 */
.home-page .card-badges .score-chip {
  font-size: 12px;
}
@media (max-width: 700px) {
  .home-page button.topic-metrics {
    min-height: 44px;
    font-size: 13px;
  }
  .home-page .experiment-info > summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 12px;
  }
  .home-page .experiment-info > summary::before {
    content: "+";
    margin-right: 6px;
  }
  .home-page .experiment-info[open] > summary::before {
    content: "−";
  }
  .home-page .topic-metadata {
    flex-wrap: wrap;
    gap: 0 8px;
  }
  .home-page .preview-dialog[data-preview-mode="image"] .preview-stage {
    height: auto;
    min-height: 0;
    max-height: 60dvh;
    overflow: auto;
    align-items: flex-start;
  }
  .home-page .preview-dialog[data-preview-mode="image"] .preview-stage img {
    flex: none;
    height: auto;
  }
  .home-page .preview-dialog button {
    min-height: 44px;
  }
  .home-page .preview-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}
.recommended-start {
  padding: 20px;
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
#open-recommendations {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  min-height: 44px;
}
#recommended-pairs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}
.recommended-pair {
  min-width: 0;
  overflow-wrap: anywhere;
}
.recommended-pair h3 {
  font-size: 15px;
  margin: 8px 0;
}
.recommended-pair a {
  display: block;
  padding: 12px 0;
}
.continue-browsing {
  padding: 8px 0;
  font-size: 13px;
}
.continue-browsing a {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 44px;
  align-content: center;
}
