/* The home page (/): the intel.trade split. White column left (logotype, headline, 5 rows,
   sign in, footer), black panel right (the dot-matrix globe and the weekly ticker).
   Phone: the black panel on top, the white column below. Linked after /assets/base.css. */

.home-main {
  justify-content: space-between;
  --reveal-base: 60ms;
}

.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
}

/* The headline, the rows and the sign in line: 360px wide, centred in the column's height. */
.home-body {
  width: 100%;
  max-width: 384px;
  margin: 48px 0;
  padding: 0 12px;
}

.home-title { margin-bottom: 28px; }

.home-signin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 12px;
}

.home-foot { padding: 0 0 4px; }

/* ---------- The black panel ---------- */

.globe-panel {
  min-height: 560px;
  isolation: isolate;
}

.globe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The weekly prints, bottom left, over the globe's dark side. */
.ticker {
  position: absolute;
  left: 56px;
  bottom: 56px;
  z-index: 2;
  pointer-events: none;
}

/* A soft black field under the ticker, so its rows read over land on narrower screens. */
.ticker::before {
  content: "";
  position: absolute;
  inset: -20px -28px;
  z-index: -1;
  background: rgba(0, 0, 0, .78);
  filter: blur(14px);
}

.ticker-rows {
  display: grid;
  min-height: calc(6 * 1.75em);
}

.ticker-rows .term-row {
  display: grid;
  grid-template-columns: 11ch 13ch 10ch 7ch;
  column-gap: 1.5ch;
  letter-spacing: 0;
  animation: tick-in 420ms var(--ease-out) both;
}

.ticker-rows .term-row:nth-child(2) { opacity: .85; }
.ticker-rows .term-row:nth-child(3) { opacity: .7; }
.ticker-rows .term-row:nth-child(4) { opacity: .55; }
.ticker-rows .term-row:nth-child(5) { opacity: .4; }
.ticker-rows .term-row:nth-child(n + 6) { display: none; }

.ticker-rows .t-val,
.ticker-rows .t-chg { text-align: right; }

/* The last line: the next weekly close, with a blinking cursor. */
.ticker-next {
  margin-top: 6px;
  color: var(--muted-on-black);
  opacity: .8;
}

.ticker-next::after {
  content: "";
  display: inline-block;
  width: .6em;
  height: 1em;
  margin-left: .6ch;
  vertical-align: -2px;
  background: var(--mint);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes tick-in {
  from { opacity: 0; transform: translateY(-4px); }
}

/* ---------- Phone: the black panel on top, the white column below ---------- */

@media (max-width: 760px) {
  .home-split { grid-template-rows: auto auto; }

  .globe-panel {
    order: -1;
    height: min(500px, 60svh);
    min-height: 420px;
  }

  .home-main { padding-top: 20px; }
  .home-body { max-width: none; margin: 28px 0 32px; padding: 0; }
  .home-signin { justify-content: flex-start; }

  .ticker {
    left: 16px;
    right: 16px;
    bottom: 16px;
    font-size: 10px;
  }

  .ticker .term-head { margin-bottom: 4px; }
  .ticker-rows { min-height: calc(3 * 1.75em); }
  .ticker-rows .term-row { grid-template-columns: 11ch 12ch 9ch 6ch; column-gap: 1.2ch; }
  .ticker-rows .term-row:nth-child(n + 4) { display: none; }
  .ticker-next { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-rows .term-row { animation: none; }
  .ticker-next::after { animation: none; }
}
