/* The home page: region doors, a news box led by the latest post, the Redline
   table, and a rail of what is next. Loaded by home.html alone, so every rule
   here is scoped to the front page. */

/* The nav keeps its icons in one group at every width. The site sheet spreads
   them across the bar on phones; here they stay together beside the logo. */
@media (max-width: 860px) {
  .nav { justify-content: flex-start; gap: 2px; }
}

.home .next-strip { margin-bottom: 14px; border-radius: var(--r); }
/* While a cup is live, one line per region: where it has got to. */
.next-strip .live-rgns { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.next-strip .what .live-rgn { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--text); }
.next-strip .live-txt { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.next-strip .what .live-rgn:hover { color: var(--bright); }

/* ---------- Region doors ---------- */
.hm-regions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 14px; }
.hm-region {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 12px 14px; color: var(--text); min-width: 0;
}
.hm-region:hover { background: var(--row-hover); border-color: var(--faint); }
.hm-region b { font-size: 15px; font-weight: 700; color: var(--bright); }
.hm-region span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Columns and boxes ---------- */
.hm-cols { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail-w); gap: 14px; align-items: start; }
.hm-main, .hm-side { min-width: 0; }
.hm-box {
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r);
  margin-bottom: 14px; overflow: hidden;
}
.hm-box > h2 {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0; padding: 10px 12px;
  background: var(--panel2); border-bottom: 1px solid var(--rule);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text);
}
.hm-box > h2 a { font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.hm-box > h2 a:hover { color: var(--accent); }
.hm-empty { margin: 0; padding: 12px; color: var(--muted); font-size: 12.5px; }

/* ---------- News ---------- */
/* The lead carries a cover when it has one, shown whole: covers set their own
   headline, so the caption goes beneath rather than over it. Without a cover,
   a tinted panel keeps the headline opening the page at size. */
.hm-lead { display: block; border-bottom: 1px solid var(--rule); color: var(--bright); }
.hm-lead img { display: block; width: 100%; height: auto; }
.hm-lead .cap { display: block; padding: 12px 16px 14px; }
.hm-lead:not(.has-cover) .cap {
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 200px; padding-top: 40px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--panel2)), var(--panel2) 65%);
}
.hm-lead .tag {
  align-self: flex-start; display: inline-block; margin-bottom: 6px; padding: 2px 6px; border-radius: 2px;
  background: var(--accent); color: #fff;
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.hm-lead .t { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; }
.hm-lead .d { display: block; margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.hm-lead:hover .t { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

.hm-news { list-style: none; margin: 0; padding: 0; }
.hm-news li + li { border-top: 1px solid var(--line); }
.hm-news a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; color: var(--text); }
.hm-news a:hover { background: var(--row-hover); }
.hm-news .thumb {
  flex: 0 0 96px; height: 50px; border: 1px solid var(--rule); border-radius: 2px; object-fit: cover;
  background: linear-gradient(135deg, var(--bar), var(--panel2));
}
.hm-news .b { min-width: 0; }
.hm-news .t { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--bright); }
.hm-news a:hover .t { color: var(--accent); }
.hm-news .d { display: block; margin-top: 2px; font-family: var(--mono); font-size: 11px; color: var(--faint); }

/* ---------- Redline table ---------- */
.hm-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.hm-tabs button {
  padding: 5px 11px; border: 0; border-radius: var(--r); background: none; cursor: pointer;
  font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.hm-tabs button:hover { background: var(--panel2); color: var(--text); }
.hm-tabs button.is-current { background: var(--accent); color: #fff; }
.hm-updating { padding: 8px 12px; border-bottom: 1px solid var(--line); }

.hm-table { width: 100%; border-collapse: collapse; }
.hm-table th {
  padding: 7px 12px; border-bottom: 1px solid var(--rule); text-align: left;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint);
}
.hm-table td { padding: 7px 12px; border-top: 1px solid var(--line); }
.hm-table tbody tr:first-child td { border-top: 0; }
.hm-table tbody tr:hover td { background: var(--row-hover); }
.hm-table .n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hm-table .rk { width: 36px; font-family: var(--mono); color: var(--faint); }
.hm-table tr.is-top .rk { color: var(--gold); font-weight: 700; }
.hm-table .sq { display: inline-flex; font-family: var(--sans); align-items: center; gap: 9px; font-weight: 600; color: var(--text); }
.hm-table .sq:hover { color: var(--accent); }
.hm-table .up { color: var(--rise); }
.hm-table .dn { color: var(--accent); }
.hm-table .fl { color: var(--faint); }

/* ---------- Rail lists ---------- */
.hm-list { list-style: none; margin: 0; padding: 0; }
.hm-list li { display: flex; gap: 10px; align-items: baseline; padding: 9px 12px; }
.hm-list li + li { border-top: 1px solid var(--line); }
.hm-list li:hover { background: var(--row-hover); }
.hm-list .b { flex: 1; min-width: 0; }
.hm-list .w { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; }

.hm-next .t { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.hm-next .rgns { display: flex; gap: 4px; margin-top: 3px; }
.hm-next.is-next .w { color: var(--accent); font-weight: 600; }

/* Kind and date on one line, the entry beneath: the rail is too narrow to
   hold all three side by side. */
.hm-list li.hm-river { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.hm-river .k {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint);
}
.hm-river .w { font-size: 10.5px; color: var(--faint); }
.hm-river .b { grid-column: 1 / -1; font-size: 12.5px; }
.hm-river .b a { color: var(--text); font-weight: 600; }
.hm-river .b a:hover { color: var(--accent); }

.hm-standout { padding: 12px; font-size: 12.5px; }
.hm-standout .who { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.hm-standout .who a { color: var(--bright); }

@media (max-width: 900px) {
  .hm-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .hm-regions { grid-auto-flow: row; }
  .hm-lead .t { font-size: 19px; }
  .hm-news .thumb { flex-basis: 76px; height: 40px; }
  .hm-table th, .hm-table td { padding-left: 9px; padding-right: 9px; }
}
