/* The page shell: header, main column, title row and local tasks.
   Phone first; min-width queries at 768px and 1024px only. */
.mm-skip-link:focus {
  position: absolute;
  top: var(--mm-space-2);
  left: var(--mm-space-2);
  z-index: 100;
  padding: var(--mm-space-2) var(--mm-space-4);
  background: var(--mm-surface);
  color: var(--mm-primary);
  font-weight: 600;
}

.mm-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* The header's band spans the viewport; its bar takes the main column's
   width and side padding, so the bar's ends line up with the content's. */
.mm-page__header {
  background: var(--mm-surface);
  border-bottom: 1px solid var(--mm-line);
}

.mm-page__bar {
  display: flex;
  align-items: center;
  gap: var(--mm-space-4);
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--mm-space-3) max(var(--mm-space-4), env(safe-area-inset-right, 0px)) var(--mm-space-3) max(var(--mm-space-4), env(safe-area-inset-left, 0px));
}

.mm-page__brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  letter-spacing: .02em;
  text-decoration: none;
}

.mm-page__logo {
  display: block;
  height: 32px;
  width: auto;
}

.mm-page__login {
  margin-left: auto;
  font-weight: 600;
}

.mm-page__main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--mm-space-5) max(var(--mm-space-4), env(safe-area-inset-right, 0px)) var(--mm-space-14) max(var(--mm-space-4), env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: var(--mm-space-4);
}

/* The content column is no query container: containment would make it the
   containing block of the fixed term explanations (tooltip.css), which
   their JS places in viewport coordinates. An action row queries its own
   frame (action-row.css). */
.mm-page__content {
  min-width: 0;
}

.mm-page__main:focus {
  outline: none;
}

.mm-messages {
  display: flex;
  flex-direction: column;
  gap: var(--mm-space-2);
}

.mm-messages:empty {
  display: none;
}

/* Title row (brandbook .mm-titlebar, .mm-title--page). */
.mm-titlebar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.mm-title--page {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--mm-serif);
  font-weight: 600;
  font-size: 25px;
  line-height: 1.15;
  text-wrap: balance;
}

.mm-titlebar__action svg {
  width: 20px;
  height: 20px;
}

/* Local tasks: core's list items inside a brandbook .mm-tabs row
   (css/components/tabs.css holds .mm-tabs itself). */
.mm-local-tasks .mm-tabs {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.mm-local-tasks .mm-tabs > li {
  display: flex;
  flex: 0 0 auto;
}

/* The account tab's attention marker (templates/navigation/_tab-attention). */
.mm-tab-attention {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  vertical-align: -2px;
}

.mm-tab-attention--critical .mm-tab-attention__shape {
  fill: var(--mm-danger);
}

.mm-tab-attention--warning .mm-tab-attention__shape {
  fill: var(--mm-action);
  stroke: var(--mm-action);
}

.mm-tab-attention__mark {
  stroke: var(--mm-surface);
}

.mm-tab-attention__dot {
  fill: var(--mm-surface);
}

.mm-tab-attention--progress {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: auto;
  padding: 0 6px 0 3px;
  border-radius: 999px;
  background: var(--mm-waiting-surface);
  color: var(--mm-waiting);
  font-size: 12px;
  font-weight: 600;
}

.mm-tab-attention__ring {
  width: 14px;
  height: 14px;
  transform: rotate(-90deg);
}

.mm-tab-attention__track {
  stroke: var(--mm-line);
}

.mm-tab-attention__value {
  stroke: var(--mm-primary);
}

@media (min-width: 768px) {
  .mm-page__bar {
    padding-left: var(--mm-space-8);
    padding-right: var(--mm-space-8);
  }

  .mm-page__main {
    padding: var(--mm-space-8) var(--mm-space-8) var(--mm-space-14);
    gap: var(--mm-space-5);
  }

  .mm-title--page {
    font-size: 28px;
  }
}

@media (min-width: 1024px) {
  .mm-page__bar,
  .mm-page__main {
    padding-left: var(--mm-space-10);
    padding-right: var(--mm-space-10);
  }
}
