/* Real-world experiments section (#realworld). */
:root {
  --rw-accent: #3f5fc4;
  --rw-muted: #6b6b6b;
  --rw-line: #e2e2e2;
}

#realworld .rw-intro p { margin-bottom: 1rem; }
#realworld h3.title { margin-top: 2.75rem; margin-bottom: 1rem; }

/* ── success-rate table, revealed by the "Detailed results" link ─────────── */
.rw-rates { margin: 0 0 0.5rem; }
.rw-rates > summary {
  display: block; width: fit-content; margin: 0 auto; padding: 0.3rem 0.2rem;
  font-size: 0.9rem; color: var(--rw-accent); cursor: pointer; list-style: none;
}
.rw-rates > summary::-webkit-details-marker { display: none; }
.rw-rates > summary::after {
  content: '\25BE'; display: inline-block; margin-left: 0.35em; font-size: 0.8em;
  transition: transform 0.15s ease;
}
.rw-rates[open] > summary::after { transform: rotate(180deg); }
.rw-rates > summary:hover { text-decoration: underline; }
.rw-rates > summary:focus-visible { outline: 2px solid var(--rw-accent); outline-offset: 2px; border-radius: 4px; }
.rw-rates table { margin-top: 1.1rem; }
.rw-rates table {
  width: 100%; max-width: 680px; margin: 1.1rem auto 0; border-collapse: collapse;
  background: #fff; border-radius: 10px; overflow: hidden;
  font-variant-numeric: tabular-nums; table-layout: fixed;
}
.rw-rates th, .rw-rates td {
  padding: 0.45rem 0.6rem; font-size: 0.86rem; border-bottom: 1px solid var(--rw-line);
}
.rw-rates thead th {
  font-family: 'Google Sans', 'Noto Sans', sans-serif; font-size: 0.74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.02em; color: #7a7a7a; text-align: right; line-height: 1.25;
}
.rw-rates thead th span { display: block; font-weight: 400; text-transform: none; letter-spacing: 0; }
.rw-rates thead th:first-child { text-align: left; }
.rw-rates thead th.is-all { color: var(--rw-accent); }
.rw-rates table tbody th { text-align: left; font-weight: 400; color: #363636; }
.rw-rates table td { text-align: right; color: #363636; }
.rw-rates td.is-all { font-weight: 600; color: var(--rw-accent); }
.rw-rates tbody tr:last-child th, .rw-rates tbody tr:last-child td { border-bottom: 0; }
.rw-note {
  text-align: center; color: var(--rw-muted); font-size: 0.78rem; line-height: 1.45;
  max-width: 640px; margin: 0.6rem auto 0;
}

/* ── object picker + three rollouts ──────────────────────────────────────── */
.rw-gallery { background: #fff; border-radius: 10px; padding: 1rem 1rem 0.9rem; }

.rw-picker { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; }
.rw-picker label {
  font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: #7a7a7a; font-weight: 600;
}
.rw-picker select {
  font: inherit; font-size: 0.9rem; color: #363636; background: #fafafa;
  border: 1px solid #dcdcdc; border-radius: 999px; padding: 0.35rem 2rem 0.35rem 1rem; cursor: pointer;
  appearance: none;
  /* chevron */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23666' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center; background-size: 0.6rem;
}
.rw-picker select:hover { border-color: #7a9be8; }
.rw-picker select:focus-visible { outline: 2px solid var(--rw-accent); outline-offset: 2px; }

/* primitive buttons */
.rw-tabs { display: flex; justify-content: center; gap: 0.35rem; margin-bottom: 0.9rem; }
.rw-tabs button {
  border: 1px solid #dcdcdc; background: #fafafa; color: #4a4a4a; border-radius: 999px;
  padding: 0.35rem 1rem; font: inherit; font-size: 0.9rem; cursor: pointer;
}
.rw-tabs button.is-active { background: #c0cef5; border-color: #7a9be8; color: #1a1a2e; font-weight: 600; }

.rw-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }

/* fixed frame so switching object or primitive never resizes the row */
.rw-cell .stage {
  position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden;
  background: #f4f4f2; border: 1px solid var(--rw-line);
}
.rw-cell .stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.rw-trial {
  text-align: center; font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: #7a7a7a; margin-top: 0.3rem; font-weight: 600;
}

@media screen and (max-width: 768px) {
  .rw-grid { grid-template-columns: 1fr; gap: 0.9rem; }
  .rw-picker { flex-wrap: wrap; }
  .rw-rates th, .rw-rates td { padding: 0.4rem 0.4rem; font-size: 0.76rem; }
}
