/* Eral's own parts, on top of the shared sections: the tests, the report, the
   questions, the closing panel, the footer and the two legal pages. */

/* On phones each frame sits above its questions; the order comes from here. */
.al-frame:nth-child(1), .al-row:nth-child(1) { --i: 0; }
.al-frame:nth-child(2), .al-row:nth-child(2) { --i: 1; }
.al-frame:nth-child(3), .al-row:nth-child(3) { --i: 2; }
.al-frame:nth-child(4), .al-row:nth-child(4) { --i: 3; }
.al-frame:nth-child(5), .al-row:nth-child(5) { --i: 4; }

/* The belt under the hero names the lab's targets in words. */
.bulletin-group span { flex: none; color: rgb(255 255 255 / .58); font-size: 13px; line-height: 1; white-space: nowrap; }

/* What Eral tests */
.er-tests { width: 100%; display: grid; gap: 48px; }
.er-group-name { margin-bottom: 16px; color: var(--mm-muted); font-size: 14px; line-height: 1.3; }
.er-test-group ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--mm-line); }
.er-test-group li { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 28px 24px 8px 0; }
.er-test-group li + li { padding-left: 24px; border-left: 1px solid var(--mm-line); }
.er-test-group svg { width: 24px; height: 24px; margin-bottom: 16px; color: var(--accent); }
.er-test-group h3 { font-size: 18px; line-height: 1.2; font-weight: 400; letter-spacing: -.01em; }
.er-test-group p { color: var(--mm-muted); font-size: 14px; line-height: 1.3; }
.er-never { width: 100%; color: var(--mm-muted); font-size: 14px; line-height: 1.3; }

/* The report, in place of the reference's chart */
.al-study-art, .al-note-art { height: auto; }
.er-report-list { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.er-report-list li { padding: 20px 0; border-top: 1px solid var(--al-line); }
.er-report-list li:last-child { padding-bottom: 0; }
.er-report-list h3 { margin-bottom: 6px; font-size: 16px; line-height: 1.25; }
.er-report-list p { color: var(--al-muted); font-size: 14px; line-height: 1.3; }
@media (hover: hover) { article.al-note:hover { background: var(--al-panel); } }

/* Questions teams ask first */
.er-faq { padding-top: 60px; }
.er-faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 40px; align-items: start; }
.er-faq-list { border-top: 1px solid var(--al-line); }
.er-faq-list details { border-bottom: 1px solid var(--al-line); }
.er-faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 44px; padding: 20px 0; font-size: 18px; line-height: 1.25; list-style: none; }
.er-faq-list summary::-webkit-details-marker { display: none; }
.er-faq-list summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  transition: transform .3s var(--al-ease);
}
.er-faq-list details[open] summary::after { transform: rotate(45deg); }
.er-faq-list details p { max-width: 640px; padding-bottom: 24px; color: var(--al-muted); font-size: 16px; line-height: 1.4; }
.er-faq-list p a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .er-faq-list summary:hover { opacity: .72; } }

/* The closing panel: the stack of layers on the right, the words on the left. */
.er-end-photo { border: 1px solid var(--al-line); background: #000; }
.er-end-photo > img { object-fit: contain; object-position: calc(100% + 96px) 50%; opacity: 1; }
.er-end-photo::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, #000 16%, rgb(0 0 0 / .55) 40%, transparent 60%); }

/* The footer: the wordmark and what the name stands for. */
.am-end .al-end-brand { justify-content: flex-start; gap: 16px; }
.er-expansion { color: var(--al-muted); font-size: 14px; line-height: 1.3; }

@media (max-width: 767.98px), (pointer: coarse) and (max-height: 500px) {
  .er-test-group ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .er-test-group li, .er-test-group li + li { padding: 20px 16px 20px 0; border-left: 0; }
  .er-test-group li:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--mm-line); }
  .er-test-group li:nth-child(n+3) { border-top: 1px solid var(--mm-line); }
  .er-test-group svg { margin-bottom: 8px; }
  .er-test-group h3 { font-size: 16px; }
  .er-faq { padding-top: 40px; }
  .er-faq-grid { grid-template-columns: 1fr; gap: 32px; }
  .er-faq-list summary { font-size: 16px; }
  .er-end-photo > img { object-position: center bottom; }
  .er-end-photo::after { background: linear-gradient(#000 34%, rgb(0 0 0 / .5) 52%, transparent 72%); }
  .er-end-photo .al-end-in { justify-content: flex-start; padding-top: 56px; }
}
@media (max-width: 419.98px) {
  .er-test-group ul { grid-template-columns: 1fr; }
  .er-test-group li:nth-child(n), .er-test-group li + li { padding: 20px 0; border-left: 0; }
  .er-test-group li + li { border-top: 1px solid var(--mm-line); }
}

/* The page for an address that matches no file */
.er-missing { min-height: 64vh; padding-bottom: 120px; }
.er-missing .al-button { margin-top: 32px; text-decoration: none; }

/* Privacy and terms */
.er-legal { padding: 168px 0 0; }
.er-legal-in { width: min(calc(100% - 40px), 720px); margin-inline: auto; }
.er-legal h1 { font-size: 48px; line-height: 1.05; letter-spacing: -.03em; }
.er-updated { margin-top: 16px; color: rgb(255 255 255 / .55); font-size: 14px; line-height: 1.3; }
.er-legal .er-lead { margin-top: 32px; color: #fff; font-size: 18px; line-height: 1.4; }
.er-legal h2 { margin: 48px 0 12px; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; }
.er-legal p, .er-legal li { color: rgb(255 255 255 / .78); font-size: 16px; line-height: 1.5; }
.er-legal p + p, .er-legal ul + p, .er-legal p + ul { margin-top: 12px; }
.er-legal ul { display: grid; gap: 8px; padding-left: 20px; list-style: disc; }
.er-legal a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.er-legal address { font-style: normal; }
@media (max-width: 767.98px) {
  .er-legal { padding-top: 120px; }
  .er-legal h1 { font-size: 34px; }
  .er-legal .er-lead { font-size: 16px; }
}
