/* The Signal Board gallery: a field's signal cards as tiles, in the editors' order.
   Three across from 1100px, two from 640px, one on phones. Search results use the same grid. */

:root { --accent-ink: color-mix(in srgb, var(--accent) 62%, #ffffff); }

.board { display: grid; gap: var(--gap); padding-block: 24px 40px; outline: none; }
.board.is-loading .gallery { opacity: .4; }

/* ---------- header ---------- */
.board-head { overflow: hidden; }
.bh-top {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 16px;
  padding: 14px var(--pad); border-bottom: 1px solid var(--line);
}
.bh-home { display: block; border-radius: 4px; }
.bh-logo { height: 26px; width: auto; }
.bh-kind { padding-left: 16px; border-left: 1px solid var(--line-strong); }
.bh-count { font-family: var(--font-mono); font-size: 0.875rem; color: var(--text-3); }
.bh-band { background: #000; aspect-ratio: 1600 / 233; overflow: hidden; }
.bh-band img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }

/* ---------- gallery ---------- */
.gallery {
  display: grid; gap: var(--gap);
  grid-template-columns: minmax(0, 1fr);
  transition: opacity 220ms var(--ease);
}
.teaser-item { display: flex; }
.teaser {
  position: relative;
  display: flex; flex-direction: column; width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface) 160px);
  color: var(--text); text-decoration: none;
  transition: transform var(--t-fast) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.teaser:hover, .teaser:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--f-accent) 60%, transparent);
  box-shadow: 0 18px 44px -24px var(--f-accent);
}
.teaser:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.t-bar { height: 5px; background: var(--f-accent); }
.t-img { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--bg); overflow: hidden; }
.t-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.teaser:hover .t-img img { transform: scale(1.03); }
.t-img.is-empty::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--f-accent) 26%, transparent), transparent 65%); }
.t-body { display: flex; flex-direction: column; gap: 8px; padding: 16px var(--pad) 18px; flex: 1; }
.t-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 0.875rem; }
.t-code { font-family: var(--font-display); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: color-mix(in srgb, var(--f-accent) 62%, #fff); }
.t-date { font-family: var(--font-mono); color: var(--text-3); }
.t-title { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.1; text-wrap: balance; }
.t-sub { color: var(--text-2); font-size: 1rem; line-height: 1.42; }
.t-bluf { font-size: 0.9375rem; line-height: 1.45; color: var(--text); padding-top: 8px; border-top: 1px solid var(--line); }
.t-bluf-k { font-family: var(--font-display); font-weight: 700; letter-spacing: .08em; color: color-mix(in srgb, var(--f-accent) 62%, #fff); }
.t-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.t-deep { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 500; color: var(--text-2); }
.t-deep.is-soon { color: var(--text-3); }
.t-deep-icon { width: 15px; height: 15px; stroke-width: 2; }
.t-go { font-family: var(--font-display); font-weight: 600; font-size: 0.875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.teaser:hover .t-go { color: var(--text); }

/* ---------- empty ---------- */
.board-empty { display: grid; justify-items: center; gap: 12px; padding: 56px var(--pad); text-align: center; }
.empty-logo { height: 28px; width: auto; opacity: .9; }
.empty-title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-title); line-height: 1.1; }
.empty-note { color: var(--text-2); max-width: 46ch; }

/* ---------- search page ---------- */
.search-head { padding: var(--pad); display: grid; gap: 14px; }
.search-title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-title); line-height: 1.05; }
.search-big { display: flex; gap: 10px; flex-wrap: wrap; }
.search-big input {
  flex: 1 1 260px; min-height: 48px; padding: 10px 14px;
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text);
  font: inherit; font-size: 1.0625rem;
}
.search-big input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-summary { color: var(--text-2); }
.search-results { margin-top: 4px; }

@media (min-width: 640px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bh-band { aspect-ratio: auto; height: 120px; }
  .bh-logo { height: 30px; }
}
@media (min-width: 1100px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bh-band { height: 128px; }
}
@media (max-width: 480px) {
  .bh-top { grid-template-columns: auto 1fr; }
  .bh-count { grid-column: 1 / -1; }
}
