/* R31: one open study, with the page itself as the shared surface. */
body.direction-frontier .notebook-chapter { padding-block: 0; }
body.direction-frontier .study-stage { padding-block: 38px 46px; }
body.direction-frontier .study-navigation {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; margin-bottom: 32px;
}
body.direction-frontier .study-tabs { display: flex; gap: 28px; min-width: 0; }
body.direction-frontier .study-tabs button {
  min-height: 48px; padding: 10px 0; border: 0;
  border-bottom: 2px solid transparent; border-radius: 0;
  color: var(--muted); background: transparent;
  font: inherit; font-size: 15px; font-weight: 500; text-align: left;
  cursor: pointer;
}
body.direction-frontier .study-tabs button[aria-selected="true"] {
  color: var(--ink); border-bottom-color: var(--ink);
}
body.direction-frontier .study-tabs button:hover { color: var(--ink); }
body.direction-frontier .study-pagination { display: flex; align-items: center; gap: 8px; flex: none; }
body.direction-frontier .study-pagination output {
  margin-right: 12px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums;
}
body.direction-frontier .study-pagination button {
  display: grid; place-items: center; width: 44px; height: 44px;
  padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: var(--paper);
  font: inherit; font-size: 22px; cursor: pointer;
}
body.direction-frontier .study-pagination button:disabled { opacity: .25; cursor: default; }
body.direction-frontier .study-pagination button:not(:disabled):hover { opacity: .8; }
body.direction-frontier .study-navigation button:focus-visible,
body.direction-frontier .study-panel:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
body.direction-frontier .study-panel>section {
  width: 100%; max-width: none; padding: 0; margin: 0; border: 0;
}
body.direction-frontier .study-stage :is(.prediction-heading,.evidence-heading) { margin-bottom: 30px; }
body.direction-frontier .study-stage :is(.prediction-heading,.evidence-heading) h2 {
  font-size: clamp(30px, 3vw, 42px); letter-spacing: -.035em; line-height: 1.12;
}
body.direction-frontier .study-stage:not([data-study-ready]) .study-panel+.study-panel { margin-top: 52px; }
body.direction-frontier .study-stage .prediction-conclusion { border-top: 0; margin-top: 24px; padding-top: 12px; }
body.direction-frontier .study-stage .prediction-values .prediction-value-linear { border-top: 0; padding-top: 8px; }
@media(min-width:1001px) {
  body.direction-frontier .study-stage :is(.prediction-stage,.evidence-layout) {
    grid-template-columns: minmax(0,2.15fr) minmax(240px,.85fr); gap: clamp(32px,4vw,64px);
  }
}
@media(max-width:700px) {
  body.direction-frontier .study-stage { padding-block: 26px 32px; }
  body.direction-frontier .study-navigation { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 26px; }
  body.direction-frontier .study-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
  body.direction-frontier .study-tabs button { font-size: 13px; min-height: 44px; }
  body.direction-frontier .study-pagination { display: none; }
  body.direction-frontier .study-pagination button { width: 44px; height: 44px; }
  body.direction-frontier .study-stage :is(.prediction-heading,.evidence-heading) { margin-bottom: 24px; }
  body.direction-frontier .study-stage :is(.prediction-heading,.evidence-heading) h2 { font-size: 30px; }
}
