/* The signed-out homepage (B9 §4). Loaded only by layouts/web/homepage, after foos.css.
   The board is kit parts (foos.css: .match, .bracket, .group-head, .nm-wrap, .field);
   everything here is the page's own. Tokens only. */

/* ---------- The history ticker: one static line the reader scrolls; it never moves on its own ---------- */
.tk {
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.tk::-webkit-scrollbar { display: none; }
.tk:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.tk__line { display: flex; width: max-content; margin: 0; padding: 0 16px; list-style: none; }
.tk__item {
  height: 40px; line-height: 40px; white-space: nowrap; color: var(--ink-2);
  font-stretch: var(--wdth-plate); font-weight: 700; font-size: var(--fs-plate);
  letter-spacing: var(--track-plate); text-transform: uppercase;
}
.tk__item b { font-weight: 800; color: var(--ink); }
.tk__item + .tk__item::before {
  content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 14px; vertical-align: middle;
  border-radius: 50%; background: var(--line-strong);
}

/* ---------- Page ---------- */
.home { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.home__hero { padding: 28px 0 24px; }
.home__sec { padding: 40px 0; border-top: 1px solid var(--line); }
.home__lede { margin-top: 8px; color: var(--ink-2); max-width: 36em; }
.home h2.t-headline { text-wrap: balance; }
.home ol, .home ul { margin: 0; padding: 0; list-style: none; }

/* ---------- The board: one real night, drawn with the kit ---------- */
.hb { padding-bottom: 40px; }
.hb__head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hb__venue, .hb__meta { color: var(--ink-2); text-wrap: balance; }
.hb__phone { display: block; margin-top: 12px; color: var(--ink); }
.hb__feeders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.hb__feeders + .match, .hb__feeders + .hb__finals { margin-top: 12px; }
.hb__tree { display: none; color: var(--ink); }
.hb-champ { overflow: hidden; padding: 20px 16px; border-radius: var(--radius-card); }
.hb__phone .hb-champ { margin-top: 12px; }
.hb-champ__call { color: var(--field-gold); }
.hb-champ__names { margin-top: 6px; color: var(--field-ink); text-wrap: balance; }
.hb__more { margin-top: 20px; }

/* ---------- Ways in ---------- */
.ways { margin-top: 16px; border-top: 1px solid var(--line); }
.way {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px;
  padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--ink);
}
.way > * { grid-column: 1; }
.way__sub { margin-top: 4px; color: var(--ink-2); }
.way__count { margin-top: 8px; font-weight: 600; }
.way > .icon { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: var(--ink-2); }
.way:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: var(--radius-control); }
.ways__note { margin-top: 16px; color: var(--ink-2); }

/* ---------- Organizers and the USTSO ---------- */
.pitch { display: flex; flex-direction: column; }
.pitch__block { display: flex; flex-direction: column; align-items: flex-start; }
.pitch__block + .pitch__block { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.pitch__body { margin-top: 8px; color: var(--ink-2); max-width: 34em; }
.pitch__block > .btn { margin-top: 20px; }
.pitch__block > .btn--tertiary { margin-top: 12px; }

/* ---------- Fifty years ---------- */
.home .era__list { margin-top: 24px; border-top: 1px solid var(--line); }
.era__row { display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.era__row[hidden] { display: none; }
.era__year { display: flex; align-items: flex-start; gap: 8px; padding-top: 2px; }
.era__year .ball { margin-top: 2px; }
.era__text { margin-top: 4px; color: var(--ink-2); }
.era__text a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.era__toggle { margin-top: 8px; }

/* ---------- The close ---------- */
.close__acts { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.close__by { margin-top: 24px; color: var(--ink-2); }
.close__by b { color: var(--ink); font-weight: 600; }

/* ---------- Footer ---------- */
.home-foot { border-top: 1px solid var(--line); }
.home-foot__in { max-width: 1280px; margin: 0 auto; padding: 16px 16px 32px; display: flex; flex-direction: column; gap: 8px; }
.home-foot__nav { display: flex; flex-wrap: wrap; column-gap: 24px; }
.home-foot__nav a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--ink); font-weight: 600; font-size: var(--fs-meta); }
.home-legal { color: var(--ink-2); font-weight: 500; font-size: var(--fs-meta); line-height: 1.35; }
.home-legal a { display: inline-block; line-height: var(--tap); color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 1024 and up: the tree; the words sit above it until 1280 ---------- */
@media (min-width: 1024px) {
  .tk__line { padding-inline: max(32px, calc((100% - 1216px) / 2)); }
  /* No nav rail here: the header follows the 1216px column; the right side gives back Sign in's 10px padding. */
  .home-page .app-header {
    padding-left: max(32px, calc((100% - 1216px) / 2));
    padding-right: max(22px, calc((100% - 1216px) / 2 - 10px));
  }
  .home { padding: 0 32px; }
  .home__top { padding: 48px 0 64px; }
  .home__hero { padding: 0 0 32px; }
  .home__sec { padding: 64px 0; }

  .hb { padding-bottom: 0; }
  .hb__phone { display: none; }
  .hb__tree { display: block; margin-top: 20px; }
  .hb__tree .hb-champ { padding: 20px; }
  .hb--reset .hb__tree .bracket { --col-w: 200px; --gap: 40px; }
  .hb__more { margin-top: 24px; }

  .ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; border-top: 0; }
  .way {
    grid-template-rows: auto auto 1fr; min-height: 184px; padding: 20px;
    background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-card);
  }
  .way > .icon { grid-row: 1; align-self: start; }
  .way__count { align-self: end; margin-top: 16px; }

  .pitch { display: grid; grid-template-columns: 1fr 1fr; }
  .pitch__block:first-child { padding-right: 48px; }
  .pitch__block + .pitch__block { margin-top: 0; padding-top: 0; padding-left: 48px; border-top: 0; border-left: 1px solid var(--line); }

  .era { display: grid; grid-template-columns: 360px minmax(0, 1fr); column-gap: 48px; align-items: start; }
  .era__intro { position: sticky; top: calc(var(--header-h) + 24px); }
  .home .era__list { margin-top: 0; }
  .era__row { grid-template-columns: 120px minmax(0, 1fr); column-gap: 24px; padding: 16px 0; }

  .close { padding: 72px 0; }
  .close__acts { flex-direction: row; }

  .home-foot__in { flex-direction: row; align-items: center; justify-content: space-between; padding: 16px 32px 32px; }
}

/* ---------- 1280 and up: the words and the night side by side in the first screen ---------- */
@media (min-width: 1280px) {
  .home__top:not(.home__top--solo):not(.home__top--stack) {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 64px; align-items: center;
  }
  .home__top:not(.home__top--solo):not(.home__top--stack) .home__hero { padding: 0; }
}
