/* #all: "we have all of it". Two big totals, the round types as keycaps, the company wall, and the app's "Asked at" card. */

#all .s-all-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 48px; align-items: stretch; }
#all .s-all-left { display: flex; flex-direction: column; min-width: 0; }

/* ---------- the two totals ---------- */
#all .s-all-big { display: flex; gap: 56px; margin: -6px 0 0; min-height: 142px; }
#all .s-all-big p { margin: 0; display: flex; flex-direction: column; }
#all .s-all-num {
  display: block; font-family: var(--display); font-weight: 700; font-size: min(100px, 8.1cqi); line-height: .98; letter-spacing: -.055em;
  font-variant-numeric: tabular-nums; color: var(--ink); min-height: 1em;
}
#all .s-all-grad {
  color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(100deg, var(--mk-a) 10%, var(--mk-b) 55%, var(--mk-c) 100%);
}
#all .s-all-big span {
  margin-top: 12px; padding-left: 4px; font-family: var(--mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}

/* ---------- round types as keycaps ---------- */
#all .s-all-keys { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 9px; }
#all .s-all-key {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  min-width: 96px; height: 58px; padding: 0 13px 10px 13px; border-radius: 13px;
  font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; color: var(--ink); white-space: nowrap;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 9%, transparent), color-mix(in srgb, var(--ink) 3%, transparent) 70%), var(--card);
  box-shadow:
    inset 0 0 0 1px var(--glass-rim),
    inset 0 1px 0 var(--bar-hi),
    inset 0 -4px 0 color-mix(in srgb, var(--page) 55%, transparent),
    0 3px 0 -1px color-mix(in srgb, var(--page) 70%, var(--ink) 8%);
  transition: transform .12s, box-shadow .12s;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
#all .s-all-key b { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .02em; color: var(--ink-3); transition: color .5s; }
/* the small light on a key, like a caps-lock light: on when the card shows a question of that round */
#all .s-all-key::before {
  content: ""; position: absolute; left: 13px; top: 11px; width: 14px; height: 3px; border-radius: 2px;
  background: color-mix(in srgb, var(--ink) 14%, transparent); transition: background .5s, box-shadow .5s;
}
#all .s-all-key.on::before { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
#all .s-all-key.on b { color: var(--accent-text); }
#all .s-all-key.zero { color: var(--ink-2); }
#all .s-all-key.down {
  transform: translateY(2px);
  box-shadow: inset 0 0 0 1px var(--glass-rim), inset 0 1px 0 var(--bar-hi), inset 0 -2px 0 color-mix(in srgb, var(--page) 55%, transparent), 0 1px 0 -1px transparent;
}

/* ---------- the company wall ---------- */
#all .s-all-wall {
  margin-top: auto; padding-top: 34px; display: flex; flex-direction: column; gap: 10px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
#all .s-all-row { overflow: hidden; }
#all .s-all-row ul {
  list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; width: max-content;
  animation: s-all-drift 110s linear infinite;
}
#all .s-all-back ul { animation-direction: reverse; animation-duration: 128s; }
#all.s-all-paused .s-all-row ul, #all .s-all-row:active ul { animation-play-state: paused; }
@keyframes s-all-drift { to { transform: translateX(-50%); } }
#all .s-all-co {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 17px 0 14px; border-radius: 22px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--card-rim);
  transition: color .45s, background .45s, box-shadow .45s;
}
#all .s-all-co::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--glass-rim); transition: background .45s, box-shadow .45s; }
#all .s-all-co.on {
  color: var(--ink); font-weight: 600;
  background: color-mix(in srgb, var(--accent) 18%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent);
}
#all .s-all-co.on::before { background: var(--accent-text); box-shadow: 0 0 8px var(--accent-text); }

/* ---------- the "Asked at" card ---------- */
#all .s-all-card {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  padding: 26px 28px 14px; border-radius: 22px; background: var(--panel); color: var(--text);
  box-shadow: var(--win-shadow), inset 0 0 0 1px var(--win-rim);
}
#all .s-all-head { position: relative; display: flex; align-items: center; gap: 14px; padding-bottom: 20px; }
#all .s-all-init {
  flex: none; width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  font-size: 19px; font-weight: 650; color: var(--text-2); background: var(--raised); box-shadow: inset 0 0 0 1px var(--rim);
}
#all .s-all-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#all .s-all-name {
  margin: 0; font-family: var(--display); font-size: 27px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#all .s-all-stat { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
#all .s-all-qn { transition: opacity .2s; }
#all .s-all-qn.swap { opacity: 0; }
#all .s-all-qn { font-family: var(--display); font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
/* how long until the next company takes its turn; gone while one is held */
#all .s-all-turn { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); }
#all .s-all-turn > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--cyan)); }
#all.s-all-held .s-all-turn > i { opacity: 0; }

#all .s-all-axis { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px 0 6px; }
#all .s-all-months { display: flex; gap: 4px; }
#all .s-all-months span {
  width: 24px; text-align: center; font-family: var(--mono); font-size: 12px; line-height: 15px; color: var(--text-3); letter-spacing: -.03em;
}
#all .s-all-months span small { display: block; font-size: 12px; color: var(--text-3); opacity: .75; }

#all .s-all-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; flex: 1; }
#all .s-all-q {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 16px; row-gap: 7px;
  position: relative; align-content: center; padding: 13px 0; box-shadow: inset 0 1px 0 var(--line);
}
#all .s-all-t {
  grid-column: 1 / -1; padding-right: 56px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: opacity .35s, transform .35s;
}
#all .s-all-x { position: absolute; right: 0; top: 14px; line-height: 20px; font-family: var(--mono); font-size: 12.5px; color: var(--text-2); align-self: center; font-variant-numeric: tabular-nums; }
#all .s-all-r { align-self: center; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: opacity .35s; }
#all .s-all-sq { display: flex; gap: 4px; }
#all .s-all-sq i {
  width: 24px; height: 24px; border-radius: 5px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-style: normal; font-weight: 600; color: transparent;
  background: color-mix(in srgb, var(--text) 5%, var(--panel)); box-shadow: inset 0 0 0 1px var(--line);
  transition: background .4s, color .4s, box-shadow .4s;
}
/* the newest month is still counting: a dashed square, as in the app */
#all .s-all-sq i:last-child:not(.lit) { background: none; box-shadow: none; outline: 1.2px dashed var(--rim); outline-offset: -1.2px; }
#all .s-all-sq i.lit { color: #fff; background: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
#all .s-all-list.swap .s-all-t, #all .s-all-list.swap .s-all-r { opacity: 0; transform: translateY(4px); }
#all .s-all-list.swap .s-all-r { transform: none; }

/* ---------- narrow laptop ---------- */
@media (max-width: 1060px) {
  #all .s-all-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  #all .s-all-num { font-size: min(96px, 11cqi); }
  #all .s-all-card { max-width: 640px; }
}

/* ---------- phone: totals, one sideways row of keys, the wall edge to edge, then the card ---------- */
@container piece (max-width: 600px) {
  #all .s-all-grid { gap: 22px; }
  #all .s-all-big { gap: 26px; min-height: 0; margin: 0; }
  #all .s-all-num { font-size: 60px; letter-spacing: -.05em; }
  #all .s-all-big span { margin-top: 8px; font-size: 12px; padding-left: 2px; }
  #all .s-all-keys {
    flex-wrap: nowrap; overflow-x: auto; margin: 18px calc(-1 * var(--gutter)) 0; padding: 2px var(--gutter) 4px;
    scroll-snap-type: x proximity; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - 28px), transparent);
  }
  #all .s-all-keys::-webkit-scrollbar { display: none; }
  #all .s-all-key { flex: none; height: 54px; scroll-snap-align: start; }
  #all .s-all-wall { margin: 0 calc(-1 * var(--gutter)); padding-top: 14px; gap: 8px; }
  #all .s-all-card { padding: 20px 16px 8px; border-radius: 20px; }
  #all .s-all-head { gap: 12px; padding-bottom: 16px; }
  #all .s-all-init { display: none; }
  #all .s-all-name, #all .s-all-qn { font-size: 22px; }
  #all .s-all-axis { padding-top: 14px; }
  #all .s-all-axis > .app-caps { display: none; }
  #all .s-all-axis { justify-content: flex-end; }
  #all .s-all-months span, #all .s-all-sq i { width: 23px; }
  #all .s-all-sq i { height: 23px; }
  #all .s-all-months, #all .s-all-sq { gap: 3px; width: 100%; justify-content: space-between; }
  #all .s-all-q { grid-template-columns: minmax(0, 1fr) auto; padding: 9px 0; row-gap: 7px; }
  #all .s-all-q:nth-child(n+5) { display: none; }
  #all .s-all-t { grid-column: 1; grid-row: 1; padding-right: 0; font-size: 14.5px; }
  #all .s-all-x { display: none; }
  #all .s-all-r { grid-column: 2; grid-row: 1; justify-self: end; }
  #all .s-all-sq { grid-column: 1 / -1; grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  #all .s-all-row ul { animation: none; }
  #all .s-all-row { overflow-x: auto; scrollbar-width: none; }
  #all .s-all-key, #all .s-all-co, #all .s-all-co::before, #all .s-all-sq i, #all .s-all-t, #all .s-all-r { transition: none; }
  #all .s-all-turn > i { display: none; }
}

#all .s-all-q.none { visibility: hidden; }
