/* How it works: alternating rows with live panel frames. */

.how-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: var(--sp-16);
  /* Centred, a 389px column of text floats in the middle of a 939px panel: 275px of white above
     the heading and the same below it. Both columns start at the top. */
  align-items: start;
  padding-block: var(--sp-12);
  border-top: 1px solid var(--line-200);
}

.how-row:first-child {
  border-top: 0;
}

.how-row.is-flipped .how-media {
  order: -1;
}

.how-media {
  display: flex;
  justify-content: center;
}

.how-frame {
  width: var(--w, 400px);
  max-width: 100%;
  border: 1px solid var(--line-200);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-2);
}

.how-frame-bar {
  padding: var(--sp-2) var(--sp-3);
  background: var(--surface);
  border-bottom: 1px solid var(--line-200);
  font-size: var(--fs-micro);
  color: var(--ink-500);
}

.how-frame iframe {
  width: 100%;
  height: 520px;
  border: 0;
  display: block;
}

/* The ready screen fills 251px of a 520px frame: two hundred pixels of white inside a bordered
   box, on the page that says the panels are live. */
.how-frame.is-short iframe {
  height: 330px;
}

.how-frame.is-medium iframe {
  height: 430px;
}

.how-frame.is-tall iframe {
  /* The result panel is the tallest of the three: at 720 the last line of the match was cut by
     the frame's own edge, under a paragraph calling these panels live. */
  height: 900px;
}

.how-facts {
  display: grid;
  gap: var(--sp-2);
  width: 100%;
}

.how-fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-3);
  border: 1px solid var(--line-200);
  border-radius: var(--r-md);
  background: var(--bg);
}

.how-fact b {
  font-size: var(--fs-small);
}

.how-fact span {
  font-size: var(--fs-micro);
  color: var(--ink-500);
}

.how-fill {
  width: 100%;
  border: 1px solid var(--line-200);
  border-radius: var(--r-lg);
  background: var(--bg);
  padding: var(--sp-4);
  display: grid;
  gap: var(--sp-2);
}

.how-fill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--line-100);
  font-size: var(--fs-small);
}

.how-fill-row:last-child {
  border-bottom: 0;
}

.how-fill-row span {
  color: var(--ink-500);
}

.how-fill-row b {
  font-weight: var(--fw-medium);
  text-align: right;
}

.how-fill-row b.is-filled {
  background: var(--accent-100);
  color: var(--accent-700);
  border-radius: var(--r-sm);
  padding: 2px var(--sp-2);
}

@media (max-width: 980px) {
  .how-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-8);
    padding-block: var(--sp-10);
  }

  .how-row.is-flipped .how-media {
    order: 0;
  }
}
