/* Shared outer frame for study home, study modes, and account pages.
   Keep these rules after the view-specific stylesheets. */
:root {
  --page-max-width: 1440px;
  --page-gutter: 32px;
  --page-spacing: 32px;
  --header-height: 48px;
  --study-footer-height: 52px;
  --active-footer-height: 0px;
  --header-gutter: max(var(--page-gutter), calc((100% - var(--page-max-width)) / 2 + var(--page-gutter)));
}

.home-view,
.app-shell,
main.profile-page {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--page-spacing) var(--page-gutter);
}

/* Study views use the available screen width, including with filters open. */
.app-shell { max-width: none; padding-inline: 16px; column-gap: 12px; }
/* Give question content the space saved by the compact review header. */
.question-focus { --page-spacing: 12px; }
.compact-header:has(.app-shell:not(.hidden)) { --header-gutter: 16px; }

.app-shell .main,
.question-focus .main {
  padding: 0;
}

.compact-header .exam-header,
.profile-header {
  box-sizing: border-box;
  min-height: var(--header-height);
  padding: 0 var(--header-gutter);
  border-bottom: 2px solid #1d3e78;
}

.profile-header .brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.7px;
  white-space: nowrap;
}
.profile-header .brand > span:last-child { font-weight: 420; color: white; }

body.compact-header { padding-bottom: 0; }
body.compact-header.has-question-footer {
  --active-footer-height: var(--study-footer-height);
  padding-bottom: var(--active-footer-height);
}
.exam-footer { padding-inline: var(--header-gutter); height: var(--study-footer-height); }

.question-focus .main {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--header-height) - 2 * var(--page-spacing) - var(--active-footer-height));
  min-height: 360px;
}
.question-focus .study-layout { flex: 1; height: auto; min-height: 0; }

@media (max-width: 760px) {
  :root { --page-gutter: 16px; --page-spacing: 24px; --study-footer-height: 47px; }
  .compact-header .exam-header, .profile-header { padding-block: 8px; }
  .profile-header .brand { font-size: 15px; }
  .question-focus .main { display: block; height: auto; min-height: 0; }
  .question-focus .study-layout { height: auto; }
}

/* Shared MedStepUp mark (same as landing): three ascending bars in the current text colour. */
.brand { display: inline-flex; align-items: center; }
.brand-symbol { display: inline-flex; align-items: flex-end; gap: 3px; margin-right: 10px; width: 23px; height: 25px; flex: none; }
.brand-symbol i { display: block; background: currentColor; width: 5px; height: 11px; }
.brand-symbol i:nth-child(2) { height: 18px; } .brand-symbol i:nth-child(3) { height: 25px; }
